From 977a0c9e4611cbe53537dc3f7ecd3f34cf4d961d Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 13 Aug 2017 22:19:37 +0200 Subject: Only unset selection if it is active --- src/sc_editor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sc_editor.c b/src/sc_editor.c index f2c17f8..2ba3392 100644 --- a/src/sc_editor.c +++ b/src/sc_editor.c @@ -1061,6 +1061,9 @@ static void rewrap_paragraph_range(struct frame *fr, int a, int b, static void unset_selection(SCEditor *e) { int a, b; + + if ( !e->sel_active ) return; + a = e->sel_start.para; b = e->sel_end.para; if ( a > b ) { -- cgit v1.2.3