mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-06 14:06:32 -04:00
Share diff-line editing with mouse actions
The selected-line keybinding and a modified click need the same path from a rendered diff row to the editor. Give that operation an explicit view-line argument before adding the mouse gesture.
This commit is contained in:
@@ -966,8 +966,11 @@ func (self *MainViewController) editLine() error {
|
||||
if !view.Highlight {
|
||||
return nil
|
||||
}
|
||||
return self.editDiffLine(view.SelectedLineIdx())
|
||||
}
|
||||
|
||||
info, ok := self.c.Helpers().DiffLine.GetDiffLineInfo(view, view.SelectedLineIdx())
|
||||
func (self *MainViewController) editDiffLine(viewLine int) error {
|
||||
info, ok := self.c.Helpers().DiffLine.GetDiffLineInfo(self.context.GetView(), viewLine)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user