[hackers][vis][PATCH] Don't use an offset of 1 for the 'L' command by default

From: Silvan Jegen <s.jegen_AT_gmail.com>
Date: Sun, 17 Jan 2016 20:52:03 +0100

---
This was the easiest way to fix this that I could think of (without
duplicating most of the 'return' line).
 vis-motions.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/vis-motions.c b/vis-motions.c
index 9bd95b9..f00d525 100644
--- a/vis-motions.c
+++ b/vis-motions.c
_AT_@ -99,7 +99,10 @@ static size_t view_lines_middle(Vis *vis, View *view) {
 
 static size_t view_lines_bottom(Vis *vis, View *view) {
 	int h = view_height_get(vis->win->view);
-	return view_screenline_goto(vis->win->view, h - vis->action.count);
+	int offset = 0;
+	if (vis->action.count > 1)
+		offset = vis->action.count;
+	return view_screenline_goto(vis->win->view, h - offset);
 }
 
 static size_t window_changelist_next(Vis *vis, Win *win, size_t pos) {
-- 
2.5.0
Received on Sun Jan 17 2016 - 20:52:03 CET

This archive was generated by hypermail 2.3.0 : Sun Jan 17 2016 - 21:00:17 CET