From 7fb4037f89bb9199098f6fe2139038522844c1a6 Mon Sep 17 00:00:00 2001 From: Diego Hernan Borghetti Date: Tue, 3 Apr 2012 01:55:31 -0300 Subject: [PATCH] Fix page up/down scrolling. Now the current line is save between each page up/down. --- buffer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/buffer.c b/buffer.c index 7190158..560ebb1 100644 --- a/buffer.c +++ b/buffer.c @@ -523,14 +523,17 @@ void e_buffer_scroll(E_Buffer *bf, int nline, int dir) if (!bf->first->prev) break; bf->first= bf->first->prev; + if (bf->line->prev) + bf->line= bf->line->prev; } else { if (!bf->first->next) break; bf->first= bf->first->next; + if (bf->line->next) + bf->line= bf->line->next; } } - bf->line= bf->first; if (bf->dot > bf->line->used) bf->dot= bf->line->used; e_buffer_recalc(bf); -- 2.11.4.GIT