diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-05-04 16:50:38 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-05-04 17:45:11 +0200 |
| commit | efe5f155bf526be4448ed8b4a0cda9072e107a79 (patch) | |
| tree | 957479a4fcc93fe429af945fbc4bbf984df8080a | |
| parent | 6df3fa2b9016cf2627ea6d0d81d6171f21c08e04 (diff) | |
| download | vis-efe5f155bf526be4448ed8b4a0cda9072e107a79.tar.gz vis-efe5f155bf526be4448ed8b4a0cda9072e107a79.tar.xz | |
view: simplify line up/down motions
As a consequence the general cursor placement code takes effect and
always places the cursor in the middle of the window when moving out
of the viewable range.
Whether this behavior is desirable remains to be seen.
| -rw-r--r-- | view.c | 6 |
1 files changed, 0 insertions, 6 deletions
@@ -921,10 +921,6 @@ size_t view_scroll_down(View *view, int lines) { } size_t view_line_up(Cursor *cursor) { - if (cursor->line && cursor->line->prev && cursor->line->prev->prev && - cursor->line->lineno != cursor->line->prev->lineno && - cursor->line->prev->lineno != cursor->line->prev->prev->lineno) - return view_screenline_up(cursor); int lastcol = cursor->lastcol; if (!lastcol) lastcol = cursor->col; @@ -936,8 +932,6 @@ size_t view_line_up(Cursor *cursor) { } size_t view_line_down(Cursor *cursor) { - if (cursor->line && (!cursor->line->next || cursor->line->next->lineno != cursor->line->lineno)) - return view_screenline_down(cursor); int lastcol = cursor->lastcol; if (!lastcol) lastcol = cursor->col; |
