Skip to content

Commit 0c67bb8

Browse files
committed
Fix: Help popup spec. Hide "za" as a valid toggle keymap because I don't
like how it looks in the UI. It still works the same, though.
1 parent 840dbde commit 0c67bb8

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lua/neogit/popups/help/actions.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ local function present(commands)
2121
end
2222

2323
if type(keymap) == "table" and next(keymap) then
24+
-- HACK: Remove "za" as listed keymap for toggle action.
25+
table.sort(keymap)
26+
if name == "Toggle" and keymap[2] == "za" then
27+
table.remove(keymap, 2)
28+
end
29+
2430
return { { name = name, keys = keymap, cmp = table.concat(keymap):lower(), fn = fn } }
2531
else
2632
return { { name = name, keys = {}, cmp = "", fn = fn } }

spec/popups/help_popup_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
" Commands Applying changes Essential commands ",
1010
" $ History M Remote <c-s> Stage all <c-r> Refresh ",
1111
" A Cherry Pick m Merge K Untrack <cr> Go to file ",
12-
" b Branch P Push s Stage za,<tab> Toggle ",
13-
" B Bisect p Pull S Stage unstaged ",
12+
" b Branch p Pull s Stage <tab> Toggle ",
13+
" B Bisect P Push S Stage unstaged ",
1414
" c Commit Q Command u Unstage ",
1515
" d Diff r Rebase U Unstage all ",
1616
" f Fetch t Tag x Discard ",

0 commit comments

Comments
 (0)