shithub: vexed

Download patch

ref: 3ed247f37b378f30ab05f14370713b7c74913791
parent: 80d7c73e627dc86dc682ef4202e56d2698c92499
author: phil9 <[email protected]>
date: Thu Dec 30 08:27:18 EST 2021

discard range selection when using keyboard

	once we use the keyboard we should operate on a single byte.
	Discard the selection range and restore the single byte selection
	as soon as a key is pressed.

--- a/vexed.c
+++ b/vexed.c
@@ -624,6 +624,10 @@
 		lastv = -1;
 	e = time(nil);
 	oldsel = sel;
+	if(sele != -1){
+		sele = -1;
+		redraw();
+	}
 	switch(k){
 	case 'q':
 	case Kdel: