File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,6 +72,19 @@ func GetCurrentContextKeymap() *Keymap {
7272
7373// SwitchContext take care of properly changing context. Resets the current context before switching.
7474func SwitchContext (context KeymapContext ) {
75+ switchContext (context )
76+ ShowAll = false
77+ }
78+
79+ func SoftSwitchContext (context KeymapContext ) {
80+ switchContext (context )
81+ }
82+
83+ func SwitchToPreviousContext () {
84+ SwitchContext (previousContext )
85+ }
86+
87+ func switchContext (context KeymapContext ) {
7588 _ , ok := Contexts [context ]
7689
7790 if ! ok {
@@ -86,11 +99,6 @@ func SwitchContext(context KeymapContext) {
8699
87100 previousContext = CurrentContext
88101 CurrentContext = context
89- ShowAll = false
90- }
91-
92- func SwitchToPreviousContext () {
93- SwitchContext (previousContext )
94102}
95103
96104// UpdateKeybindHelpDesc allows to temporary change the help description for a keybind in the current Keymap context.
You can’t perform that action at this time.
0 commit comments