summaryrefslogtreecommitdiff
path: root/src/fe-text
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-text')
-rw-r--r--src/fe-text/textbuffer-view.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fe-text/textbuffer-view.c b/src/fe-text/textbuffer-view.c
index beddae19..27ee7af5 100644
--- a/src/fe-text/textbuffer-view.c
+++ b/src/fe-text/textbuffer-view.c
@@ -1095,7 +1095,8 @@ static void view_remove_line_update_startline(TEXT_BUFFER_VIEW_REC *view,
int scroll;
if (view->startline == line) {
- view->startline = view->startline->next;
+ view->startline = view->startline->prev != NULL ?
+ view->startline->prev : view->startline->next;
view->subline = 0;
} else {
scroll = view->height -