Fix index() not working when page margins defined

This commit is contained in:
Kovid Goyal
2016-11-20 18:04:56 +05:30
parent 5636971999
commit 222911874d

View File

@@ -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