Skip to content

Commit 57b8d17

Browse files
committed
ui/ncurses: fix horizontal scrolling when cursor is too far right
1 parent dc65655 commit 57b8d17

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ui_ncurses.c

+2
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,8 @@ static void ui_ncurses_redisplay_cb(void)
302302
} else if (pos - priv->win_inp_offset >= COLS - 1 &&
303303
width - priv->win_inp_offset >= COLS) {
304304
priv->win_inp_offset += COLS / 2;
305+
if (pos - priv->win_inp_offset >= COLS)
306+
priv->win_inp_offset = pos - COLS + 1;
305307
}
306308

307309
werase(priv->win_inp);

0 commit comments

Comments
 (0)