diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-12-31 17:21:15 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-12-31 17:21:15 +0100 |
| commit | cff6ed5b6986cc22fe78288a9c7486026578ab47 (patch) | |
| tree | 77a9e790b6f6161e3d49aff7545ae8aa4cb74b82 /view.c | |
| parent | 0e4a0b6d58d7810d24e96d07814afe792e46b0b8 (diff) | |
| download | vis-cff6ed5b6986cc22fe78288a9c7486026578ab47.tar.gz vis-cff6ed5b6986cc22fe78288a9c7486026578ab47.tar.xz | |
view: fix regression
This reverts 2f4b69cc67e8863e5789817ed5097158e6163621. There are
likely still some problems left when editing the end of a file
at end of the visual area.
Diffstat (limited to 'view.c')
| -rw-r--r-- | view.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -383,7 +383,7 @@ static bool view_addch(View *view, Cell *cell) { if (view->line) view->line->lineno = lineno + 1; view->col = 0; - return view->line; + return true; default: if ((unsigned char)cell->data[0] < 128 && !isprint((unsigned char)cell->data[0])) { /* non-printable ascii char, represent it as ^(char + 64) */ @@ -1145,6 +1145,8 @@ void view_cursors_to(Cursor *c, size_t pos) { /* make sure we redraw changes to the very first character of the window */ if (view->start == pos) view->start_last = 0; + if (view->end == pos) + view_viewport_down(view, 1); /* set the start of the viewable region to the start of the line on which * the cursor should be placed. if this line requires more space than * available in the view then simply start displaying text at the new |
