diff options
author | Jesse Luehrs <doy@tozt.net> | 2017-07-18 23:42:21 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2017-07-18 23:42:21 -0400 |
commit | 27d31bb5edc1167043fc3412bea5c456a3c8f7e6 (patch) | |
tree | a45bbe4b262d8a5d259c66b6cc6b7b9fdc618b59 /src | |
parent | 2e7e8e22154ce37ad8b95d29b276be8a25f67e8f (diff) | |
download | runes-27d31bb5edc1167043fc3412bea5c456a3c8f7e6.tar.gz runes-27d31bb5edc1167043fc3412bea5c456a3c8f7e6.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/window-xlib.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/window-xlib.c b/src/window-xlib.c index 461733a..b183447 100644 --- a/src/window-xlib.c +++ b/src/window-xlib.c @@ -1224,7 +1224,7 @@ static int runes_window_is_word_char(RunesTerm *t, int row, int col) r = &t->scr->grid->rows[row - 1 + t->scr->grid->row_top]; if (r->wrapped) { prev_row = row - 1; - prev_col = t->scr->grid->max.col; + prev_col = t->scr->grid->max.col - 1; } } @@ -1318,9 +1318,9 @@ static struct vt100_loc runes_window_get_mouse_position( ret.row = ret.row < 0 ? 0 : ret.row > t->scr->grid->max.row - 1 ? t->scr->grid->max.row - 1 : ret.row; - ret.col = ret.col < 0 ? 0 - : ret.col > t->scr->grid->max.col ? t->scr->grid->max.col - : ret.col; + ret.col = ret.col < 0 ? 0 + : ret.col > t->scr->grid->max.col - 1 ? t->scr->grid->max.col - 1 + : ret.col; ret.row = ret.row - t->display->row_visible_offset + t->scr->grid->row_count - t->scr->grid->max.row; |