requested from time to time.
page up/down keys. In vim I've set a very large scroll offset which
keeps the cursor in the center line of the window. When I page
up/down it moves by a full page, and keeps my cursor in the center.
Post by Julian Orth---
window.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/window.c b/window.c
index d85f19a..4dda29a 100644
--- a/window.c
+++ b/window.c
@@ -346,12 +346,12 @@ void window_goto_bottom(struct window *win)
void window_page_up(struct window *win)
{
- window_up(win, win->nr_rows - 1);
+ window_up(win, win->nr_rows - 1 - scroll_offset);
}
void window_page_down(struct window *win)
{
- window_down(win, win->nr_rows - 1);
+ window_down(win, win->nr_rows - 1 - scroll_offset);
}
int window_get_nr_rows(struct window *win)
--
1.7.12
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/