aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-02-14 07:17:09 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-02-14 07:17:09 +0530
commita0339adf840c0a5233fa2046e805c907c8ae8479 (patch)
treefad23b9ca466ccc3945515b252db33caddf491af
parent928f325a7439193b11d34117f648b2cd846ea1ea (diff)
downloadnnn-a0339adf840c0a5233fa2046e805c907c8ae8479.tar.gz
Minor refactor
-rw-r--r--src/nnn.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 5941f37..431b0ab 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4964,17 +4964,17 @@ nochange:
switch (sel) {
case SEL_CLICK:
if (getmouse(&event) != OK)
- goto nochange; // fallthrough
- case SEL_BACK:
+ goto nochange;
+
/* Handle clicking on a context at the top */
- if (sel == SEL_CLICK && event.bstate == BUTTON1_PRESSED && event.y == 0) {
+ if (event.bstate == BUTTON1_PRESSED && event.y == 0) {
/* Get context from: "[1 2 3 4]..." */
r = event.x >> 1;
/* If clicked after contexts, go to parent */
if (r >= CTX_MAX)
sel = SEL_BACK;
- else if (r >= 0 && r < CTX_MAX && r != cfg.curctx) {
+ else if (r >= 0 && r != cfg.curctx) {
if (cfg.selmode)
lastappendpos = selbufpos;
@@ -4988,8 +4988,8 @@ nochange:
setdirwatch();
goto begin;
}
- }
-
+ } // fallthrough
+ case SEL_BACK:
if (sel == SEL_BACK) {
dir = visit_parent(path, newpath, &presel);
if (!dir)