From: Arun Prakash Jana <engineerarun@gmail.com>
Date: Thu, 12 Dec 2019 15:59:48 +0000 (+0530)
Subject: Update selection when context changed on mouse click
X-Git-Tag: v2.9~175
X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=fcba62d296d6f2b1f79ce7df72f984afd0c8fe3f;p=nnn.git

Update selection when context changed on mouse click
---

diff --git a/src/nnn.c b/src/nnn.c
index 8b101220..be5be2c3 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4328,6 +4328,11 @@ nochange:
 				if (r >= CTX_MAX)
 					sel = SEL_BACK;
 				else if (r >= 0 && r < CTX_MAX && r != cfg.curctx) {
+					if (cfg.selmode) {
+						updateselbuf(path, newpath);
+						ctx_changed = TRUE;
+					}
+
 					savecurctx(&cfg, path, dents[cur].name, r);
 
 					/* Reset the pointers */