From ca8180e1b78b4ca6a92bf02caafd2632323c2eba Mon Sep 17 00:00:00 2001 From: Francisco Miamoto Date: Sat, 12 Mar 2022 20:36:50 -0300 Subject: Use editFileAtLine method for line by line panel --- pkg/gui/line_by_line_panel.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'pkg/gui') 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 } -- cgit v1.2.3