Fix copy mode when the buffer size is smaller than 2000

This commit is contained in:
Nicolas Viennot 2013-06-26 00:54:27 -04:00
parent ddf0a9dd55
commit 59cab76dd8
2 changed files with 3 additions and 2 deletions

View File

@ -203,7 +203,8 @@ void tmate_sync_copy_mode(struct window_pane *wp)
if (data->screen.sel.flag) {
pack(array, 3);
pack(int, data->selx);
pack(int, data->sely);
pack(int, -data->sely + screen_hsize(data->backing)
+ screen_size_y(data->backing) - 1);
pack(int, data->rectflag);
} else
pack(array, 0);

View File

@ -17,7 +17,7 @@
#define TMATE_MAX_MESSAGE_SIZE (16*1024)
#define TMATE_PROTOCOL_VERSION 1
#define TMATE_PROTOCOL_VERSION 2
enum tmate_commands {
TMATE_HEADER,