From 9a4f43dec861ee8aa398adf901fd4d11d7a24dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 16 Sep 2014 17:28:32 +0200 Subject: Clean up cursor handling in window.[ch] --- window.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'window.h') diff --git a/window.h b/window.h index d575341..602c962 100644 --- a/window.h +++ b/window.h @@ -33,6 +33,14 @@ size_t window_char_next(Win*); size_t window_char_prev(Win*); size_t window_line_down(Win*); size_t window_line_up(Win*); +/* move window content up/down, but keep cursor position unchanged unless it is + * on a now invisible line in which case we try to preserve the column position */ +size_t window_slide_up(Win*, int lines); +size_t window_slide_down(Win*, int lines); +/* scroll window contents up/down by lines, place the cursor on the newly + * visible line, try to preserve the column position */ +size_t window_scroll_up(Win*, int lines); +size_t window_scroll_down(Win*, int lines); /* place the cursor at the start ot the n-th window line, counting from 1 */ size_t window_line_goto(Win*, int n); -- cgit v1.2.3