From ca222a7cc0d5a55312d96000a617e11d7a9996a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Fri, 3 Apr 2015 18:39:22 +0200 Subject: Add option to display relative line numbers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :set rnu Based on a patch by Sebastian Götte. --- window.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'window.c') diff --git a/window.c b/window.c index 81bb7b5..888389a 100644 --- a/window.c +++ b/window.c @@ -820,6 +820,10 @@ size_t window_cursor_get(Win *win) { return win->cursor.pos; } +const Line *window_lines_get(Win *win) { + return win->topline; +} + void window_scroll_to(Win *win, size_t pos) { while (pos < win->start && window_viewport_up(win, 1)); while (pos > win->end && window_viewport_down(win, 1)); -- cgit v1.2.3