Add JumpLine action back

You can bind to "command-edit:goto ", but binding to the action
"JumpLine" will have the same effect now.

Fixes #1550
This commit is contained in:
Zachary Yedidia
2020-03-02 20:09:19 -05:00
parent a19cd2e6d0
commit 629efe5eb7
2 changed files with 11 additions and 0 deletions

View File

@@ -1120,6 +1120,16 @@ func (h *BufPane) OpenFile() bool {
return true
}
// OpenFile opens a new file in the buffer
func (h *BufPane) JumpLine() bool {
InfoBar.Prompt("> ", "goto ", "Command", nil, func(resp string, canceled bool) {
if !canceled {
h.HandleCommand(resp)
}
})
return true
}
// Start moves the viewport to the start of the buffer
func (h *BufPane) Start() bool {
v := h.GetView()

View File

@@ -615,6 +615,7 @@ var BufKeyActions = map[string]BufKeyAction{
"RemoveAllMultiCursors": (*BufPane).RemoveAllMultiCursors,
"SkipMultiCursor": (*BufPane).SkipMultiCursor,
"JumpToMatchingBrace": (*BufPane).JumpToMatchingBrace,
"JumpLine": (*BufPane).JumpLine,
"None": (*BufPane).None,
// This was changed to InsertNewline but I don't want to break backwards compatibility