summaryrefslogtreecommitdiff
path: root/src/fe-text/textbuffer-view.c
diff options
context:
space:
mode:
authorDorian Harmans <dorian@woohooyeah.nl>2018-03-26 22:50:54 +0200
committerDorian Harmans <dorian@woohooyeah.nl>2018-03-26 22:50:54 +0200
commit17920ab5aa11be86dc15c83fce8f5d879f104ed8 (patch)
tree051cb9ccee5547773f3a0a8f376d27a36c465f83 /src/fe-text/textbuffer-view.c
parent25a44dacf4114f33f3a887f358c02f4fd9938427 (diff)
parent7fc59d2d1016e28eced6dbcaddc1e1865fe0ebe8 (diff)
downloadirssi-17920ab5aa11be86dc15c83fce8f5d879f104ed8.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/fe-text/textbuffer-view.c')
-rw-r--r--src/fe-text/textbuffer-view.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fe-text/textbuffer-view.c b/src/fe-text/textbuffer-view.c
index 99625ecc..3ccd95f5 100644
--- a/src/fe-text/textbuffer-view.c
+++ b/src/fe-text/textbuffer-view.c
@@ -913,11 +913,14 @@ void textbuffer_view_resize(TEXT_BUFFER_VIEW_REC *view, int width, int height)
} else if (view->startline == view->bottom_startline &&
view->subline > view->bottom_subline) {
view->subline = view->bottom_subline;
- } else {
+ } else if (view->startline != NULL) {
/* make sure the subline is still in allowed range */
linecount = view_get_linecount(view, view->startline);
if (view->subline > linecount)
view->subline = linecount;
+ } else {
+ /* we don't have a startline. still under construction? */
+ view->subline = 0;
}
textbuffer_view_init_ypos(view);