diff options
author | Francisco Miamoto <francisco@dorayaki.co> | 2022-03-12 20:36:50 -0300 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-16 20:43:53 +1100 |
commit | ca8180e1b78b4ca6a92bf02caafd2632323c2eba (patch) | |
tree | 410506175222857a2a737ede4bda78735286e189 /pkg | |
parent | f53b10072deeb2923d6b932287c4b39bb7bd389e (diff) |
Use editFileAtLine method for line by line panel
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/gui/line_by_line_panel.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/pkg/gui/line_by_line_panel.go b/pkg/gui/line_by_line_panel.go index 0576d3c0f..a033aa0d7 100644 --- a/pkg/gui/line_by_line_panel.go +++ b/pkg/gui/line_by_line_panel.go @@ -1,8 +1,6 @@ package gui import ( - "fmt" - "github.com/go-errors/errors" "github.com/jesseduffield/lazygit/pkg/commands/patch" "github.com/jesseduffield/lazygit/pkg/gui/lbl" @@ -217,8 +215,7 @@ func (gui *Gui) handleOpenFileAtLine() error { // need to look at current index, then work out what my hunk's header information is, and see how far my line is away from the hunk header lineNumber := state.CurrentLineNumber() - filenameWithLineNum := fmt.Sprintf("%s:%d", filename, lineNumber) - if err := gui.OSCommand.OpenFile(filenameWithLineNum); err != nil { + if err := gui.editFileAtLine(filename, lineNumber); err != nil { return err } |