diff --git a/internal/action/actions.go b/internal/action/actions.go index c13b8c45..d176096f 100644 --- a/internal/action/actions.go +++ b/internal/action/actions.go @@ -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() diff --git a/internal/action/bufpane.go b/internal/action/bufpane.go index 7351f1f7..a7a7d91b 100644 --- a/internal/action/bufpane.go +++ b/internal/action/bufpane.go @@ -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