aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--view.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/view.c b/view.c
index 81716e7..db39de7 100644
--- a/view.c
+++ b/view.c
@@ -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