aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2016-04-03 11:35:18 +0200
committerThomas White <taw@bitwiz.org.uk>2016-04-03 11:35:18 +0200
commit0c214cc897530b6d52e6a3c002a8bf9994284d91 (patch)
treede049a7fe7521cac97ef7d156208057ba089ddd5 /src
parent985b498081cfbf6f3ecf08b320a65aff7edeb207 (diff)
Fix new frames
Diffstat (limited to 'src')
-rw-r--r--src/frame.c5
-rw-r--r--src/sc_editor.c1
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 :