diff options
author | Thomas White <taw@physics.org> | 2017-08-13 22:19:37 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2017-08-13 22:20:07 +0200 |
commit | 977a0c9e4611cbe53537dc3f7ecd3f34cf4d961d (patch) | |
tree | 4c6513110c8c5fc38f88bc7646e09afba7c25184 | |
parent | bca0a57008988566e33b6b31809e943a126bbc6c (diff) |
Only unset selection if it is active
-rw-r--r-- | src/sc_editor.c | 3 |
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 ) { |