aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sc_editor.c3
1 files changed, 3 insertions, 0 deletions
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 ) {