summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Webb <chris@arachsys.com>2021-12-11 12:11:08 +0000
committerChris Webb <chris@arachsys.com>2021-12-11 12:11:08 +0000
commit4a10220db85f35cc1b0538b97ff393ce24e58b5c (patch)
tree765e416aac6d09c3a0922887615e773da515c20a /src
parent558d809a34acfcc8edeb182dd39a47e1ced60641 (diff)
Fix mode line inconsistency between normal and insert modes
In normal mode, the mode line contains "1 sel" or "n sels (k)" when n > 1, whereas in insert mode, it contains "n sels (k)" even for n == 1. Change the contents in insert mode to match normal mode.
Diffstat (limited to 'src')
-rw-r--r--src/input_handler.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc
index ef25826b..8adbbcee 100644
--- a/src/input_handler.cc
+++ b/src/input_handler.cc
@@ -1443,8 +1443,9 @@ public:
auto main_index = context().selections().main_index();
return {AtomList{ { "insert", context().faces()["StatusLineMode"] },
{ " ", context().faces()["StatusLine"] },
- { format( "{} sels ({})", num_sel, main_index + 1),
- context().faces()["StatusLineInfo"] } }};
+ { num_sel == 1 ? format("{} sel", num_sel)
+ : format("{} sels ({})", num_sel, main_index + 1),
+ context().faces()["StatusLineInfo"] } }};
}
KeymapMode keymap_mode() const override { return KeymapMode::Insert; }