mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-15 20:17:50 +08:00
Add nav-page-{up,down}.
This commit is contained in:
parent
425f19165f
commit
29dbe00e49
|
@ -55,6 +55,8 @@ var builtins = []Builtin{
|
|||
{"start-nav", startNav},
|
||||
{"nav-up", navUp},
|
||||
{"nav-down", navDown},
|
||||
{"nav-page-up", navPageUp},
|
||||
{"nav-page-down", navPageDown},
|
||||
{"nav-left", navLeft},
|
||||
{"nav-right", navRight},
|
||||
{"nav-trigger-shown-hidden", navTriggerShowHidden},
|
||||
|
@ -149,14 +151,16 @@ var defaultBindings = map[ModeType]map[Key]string{
|
|||
Default: "compl-default",
|
||||
},
|
||||
modeNavigation: map[Key]string{
|
||||
Key{Up, 0}: "nav-up",
|
||||
Key{Down, 0}: "nav-down",
|
||||
Key{Left, 0}: "nav-left",
|
||||
Key{Right, 0}: "nav-right",
|
||||
Key{Tab, 0}: "nav-insert-selected",
|
||||
Key{'H', Ctrl}: "nav-trigger-shown-hidden",
|
||||
Key{'[', Ctrl}: "start-insert",
|
||||
Default: "navigation-default",
|
||||
Key{Up, 0}: "nav-up",
|
||||
Key{Down, 0}: "nav-down",
|
||||
Key{PageUp, 0}: "nav-page-up",
|
||||
Key{PageDown, 0}: "nav-page-down",
|
||||
Key{Left, 0}: "nav-left",
|
||||
Key{Right, 0}: "nav-right",
|
||||
Key{Tab, 0}: "nav-insert-selected",
|
||||
Key{'H', Ctrl}: "nav-trigger-shown-hidden",
|
||||
Key{'[', Ctrl}: "start-insert",
|
||||
Default: "navigation-default",
|
||||
},
|
||||
modeHistory: map[Key]string{
|
||||
Key{Up, 0}: "history-up",
|
||||
|
|
|
@ -44,6 +44,14 @@ func navDown(ed *Editor) {
|
|||
ed.navigation.next()
|
||||
}
|
||||
|
||||
func navPageUp(ed *Editor) {
|
||||
ed.navigation.current.pageUp()
|
||||
}
|
||||
|
||||
func navPageDown(ed *Editor) {
|
||||
ed.navigation.current.pageDown()
|
||||
}
|
||||
|
||||
func navLeft(ed *Editor) {
|
||||
ed.navigation.ascend()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user