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:
Stefan Haller
2026-10-01 17:28:30 +02:00
parent 405b817424
commit 1cf9e78e48
+4 -1
View File
@@ -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
}