diff options
author | Nicolas Viennot <nicolas@viennot.biz> | 2013-06-26 00:54:27 -0400 |
---|---|---|
committer | Nicolas Viennot <nicolas@viennot.biz> | 2013-06-26 00:54:27 -0400 |
commit | 59cab76dd89d96cdcc446567711462eb1c53ca35 (patch) | |
tree | 85daf65465161bdb1e1af8fe0810fbdd92fcaf79 | |
parent | ddf0a9dd553bba444d3b39b90ee1dbd19cf9e735 (diff) |
Fix copy mode when the buffer size is smaller than 2000
-rw-r--r-- | tmate-encoder.c | 3 | ||||
-rw-r--r-- | tmate.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/tmate-encoder.c b/tmate-encoder.c index 7cd11dbb..3db8e8d7 100644 --- a/tmate-encoder.c +++ b/tmate-encoder.c @@ -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); @@ -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, |