aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.clang-tidy2
-rw-r--r--README.md1
-rw-r--r--src/nnn.c7
3 files changed, 7 insertions, 3 deletions
diff --git a/.clang-tidy b/.clang-tidy
index c03204c..885adc7 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -10,4 +10,6 @@ CheckOptions:
value: '_t'
- key: fuchsia-restrict-system-includes.Includes
value: '*,-stdint.h,-stdbool.h'
+ - key: readability-function-size.StatementThreshold
+ value: '850'
...
diff --git a/README.md b/README.md
index 9083f9a..9acbcb0 100644
--- a/README.md
+++ b/README.md
@@ -98,6 +98,7 @@ It runs on Linux, macOS, Raspberry Pi, BSD, Cygwin, Linux subsystem for Windows
- Detailed file information
- Media information (needs mediainfo/exiftool)
- Convenience
+ - Mouse support
- Create, rename files and directories
- Select files across dirs; all/range selection
- Copy, move, delete, archive, link selection
diff --git a/src/nnn.c b/src/nnn.c
index fe62eb3..272aeda 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -3136,6 +3136,7 @@ nochange:
case SEL_CLICK:
if (getmouse(&event) != OK)
break;
+
// Handle clicking on a context at the top:
if (event.y == 0) {
// Get context from: "[1 2 3 4]..."
@@ -3155,6 +3156,7 @@ nochange:
}
break;
}
+
// Handle clicking on a file:
if (2 <= event.y && event.y < LINES - 2) {
r = 0;
@@ -3168,10 +3170,9 @@ nochange:
cur = r;
// Single click just selects, double click also opens
if (event.bstate != BUTTON1_DOUBLE_CLICKED)
- break;
- } else {
+ break; // fallthrough
+ } else
break;
- }
case SEL_NAV_IN: // fallthrough
case SEL_GOIN:
/* Cannot descend in empty directories */