Added stash/pop stash keybinding
This commit is contained in:
parent
761ea59986
commit
cb705f29d1
@ -57,6 +57,16 @@ enum class KeybindingOption {
|
||||
* Used to show branch creation dialog
|
||||
*/
|
||||
BRANCH_CREATE,
|
||||
|
||||
/**
|
||||
* Used to stash workspace changes
|
||||
*/
|
||||
STASH,
|
||||
|
||||
/**
|
||||
* Used to pop stash changes to workspace
|
||||
*/
|
||||
STASH_POP,
|
||||
}
|
||||
|
||||
|
||||
@ -90,6 +100,12 @@ private fun baseKeybindings() = mapOf(
|
||||
KeybindingOption.BRANCH_CREATE to listOf(
|
||||
Keybinding(key = Key.B, control = true),
|
||||
),
|
||||
KeybindingOption.STASH to listOf(
|
||||
Keybinding(key = Key.S, control = true),
|
||||
),
|
||||
KeybindingOption.STASH_POP to listOf(
|
||||
Keybinding(key = Key.S, control = true, shift = true),
|
||||
),
|
||||
)
|
||||
|
||||
private fun linuxKeybindings(): Map<KeybindingOption, List<Keybinding>> = baseKeybindings()
|
||||
|
@ -128,6 +128,14 @@ fun RepositoryOpenPage(
|
||||
false
|
||||
}
|
||||
}
|
||||
it.matchesBinding(KeybindingOption.STASH) -> {
|
||||
tabViewModel.stash()
|
||||
true
|
||||
}
|
||||
it.matchesBinding(KeybindingOption.STASH_POP) -> {
|
||||
tabViewModel.popStash()
|
||||
true
|
||||
}
|
||||
else -> false
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user