aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2013-03-18 23:52:13 +0100
committerThomas White <taw@bitwiz.org.uk>2013-03-19 08:17:08 +0100
commit561261eff94ab93131c23859fb850e6dc36f87ab (patch)
tree157f74976ac04b5e8ac89508b233b98fdc51d14f /src/mainwindow.c
parentef2b60cfeeeb8a03a4122d0a244b01c26e33968b (diff)
Cursor position stuff
Diffstat (limited to 'src/mainwindow.c')
-rw-r--r--src/mainwindow.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mainwindow.c b/src/mainwindow.c
index 05f5a3d..562a95b 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -37,6 +37,7 @@
#include "render.h"
#include "frame.h"
#include "slideshow.h"
+#include "wrap.h"
/* Update a slide, once it's been edited in some way. */
@@ -566,6 +567,7 @@ static gint add_furniture(GtkWidget *widget, struct presentation *p)
fr->sc_len = 6;
set_selection(p, fr);
fr->pos = 0;
+ p->cursor_pos = 0;
do_slide_update(p, p->pc);
@@ -919,8 +921,9 @@ static void insert_text(struct frame *fr, char *t, struct presentation *p)
free(tmp);
rerender_slide(p, p->pc);
- redraw_editor(p);
fr->pos += tlen;
+ p->cursor_pos = fr->pos;
+ redraw_editor(p);
fr->empty = 0;
}