diff options
author | Thomas White <taw@bitwiz.org.uk> | 2016-04-03 11:35:18 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2016-04-03 11:35:18 +0200 |
commit | 0c214cc897530b6d52e6a3c002a8bf9994284d91 (patch) | |
tree | de049a7fe7521cac97ef7d156208057ba089ddd5 | |
parent | 985b498081cfbf6f3ecf08b320a65aff7edeb207 (diff) |
Fix new frames
-rw-r--r-- | src/frame.c | 5 | ||||
-rw-r--r-- | src/sc_editor.c | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/frame.c b/src/frame.c index 7f61a89..56cb7c8 100644 --- a/src/frame.c +++ b/src/frame.c @@ -577,7 +577,10 @@ int find_cursor(struct frame *fr, double x, double y, pos = npos; } - if ( fr->n_paras == 0 ) return 1; + if ( fr->n_paras == 0 ) { + printf("No paragraphs in frame.\n"); + return 1; + } /* Pretend it's in the last paragraph */ pos -= fr->paras[fr->n_paras-1]->height; diff --git a/src/sc_editor.c b/src/sc_editor.c index d36b51c..b4b2e78 100644 --- a/src/sc_editor.c +++ b/src/sc_editor.c @@ -1088,6 +1088,7 @@ static gboolean button_release_sig(GtkWidget *da, GdkEventButton *event, e->cursor_frame = fr; e->cursor_para = 0; e->cursor_pos = 0; + e->cursor_trail = 0; break; case DRAG_REASON_IMPORT : |