From c6c1a2e6b3f4bca8e833d3c519a78bcf2f41d5c3 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sat, 20 May 2017 21:28:58 +0200 Subject: Set cursor position after block delete --- src/sc_editor.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/sc_editor.c') diff --git a/src/sc_editor.c b/src/sc_editor.c index ffc895f..32974fb 100644 --- a/src/sc_editor.c +++ b/src/sc_editor.c @@ -723,6 +723,12 @@ static void do_backspace(struct frame *fr, SCEditor *e) printf("delete block\n"); delete_text_from_frame(e->cursor_frame, e->sel_start, e->sel_end, wrapw); + /* Cursor goes at start of deletion */ + e->cursor_para = e->sel_start.para; + e->cursor_pos = e->sel_start.pos; + e->cursor_trail = e->sel_start.trail; + e->sel_active = 0; + } else { /* Delete one character */ -- cgit v1.2.3