aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-08-13 22:19:37 +0200
committerThomas White <taw@physics.org>2017-08-13 22:20:07 +0200
commit977a0c9e4611cbe53537dc3f7ecd3f34cf4d961d (patch)
tree4c6513110c8c5fc38f88bc7646e09afba7c25184 /src
parentbca0a57008988566e33b6b31809e943a126bbc6c (diff)
Only unset selection if it is active
Diffstat (limited to 'src')
-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 ) {