From 222911874d81ba9dabfc219140098815b6d8ba79 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 20 Nov 2016 18:04:56 +0530 Subject: [PATCH] Fix index() not working when page margins defined --- kitty/screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/screen.c b/kitty/screen.c index e2cafa9f0..9d27b1b5f 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -522,7 +522,7 @@ void screen_cursor_to_column(Screen *self, unsigned int column) { void screen_index(Screen *self) { // Move cursor down one line, scrolling screen if needed unsigned int top = self->margin_top, bottom = self->margin_bottom; - if (self->cursor->y == self->margin_bottom) { + if (self->cursor->y == bottom) { linebuf_index(self->linebuf, top, bottom); if (self->linebuf == self->main_linebuf) { // TODO: Add line to tophistorybuf