aboutsummaryrefslogtreecommitdiff
path: root/libstorycode
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2019-05-03 22:06:56 +0200
committerThomas White <taw@bitwiz.me.uk>2019-05-03 22:06:56 +0200
commit36fae6750885e2b6458f61369b23c26fb6b75bf9 (patch)
treeb9d82260430f92bc612c25cb13759979bde2553c /libstorycode
parentcea453dee6871c91a570b038cf9f286bfce1a0ce (diff)
Fix crashes caused by toolbar paragraph motion buttons
Diffstat (limited to 'libstorycode')
-rw-r--r--libstorycode/gtk/gtknarrativeview.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libstorycode/gtk/gtknarrativeview.c b/libstorycode/gtk/gtknarrativeview.c
index 58cbd8e..48ef91f 100644
--- a/libstorycode/gtk/gtknarrativeview.c
+++ b/libstorycode/gtk/gtknarrativeview.c
@@ -1192,6 +1192,7 @@ void gtk_narrative_view_set_cursor_para(GtkNarrativeView *e, signed int pos)
double h;
int i;
+ if ( pos < 0 ) pos = e->n->n_items-1;
e->cpos.para = pos;
e->cpos.pos = 0;
e->cpos.trail = 0;