diff options
author | Ryooooooga <eial5q265e5@gmail.com> | 2022-04-04 21:12:33 +0900 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-04-06 08:27:03 +1000 |
commit | 3b5a019e1a33bbb9b331d44956f98b2b8c4cd5a9 (patch) | |
tree | 8b4c129d57124441edee6a1d7d6734796498d1b6 /pkg/gui/mergeconflicts/state.go | |
parent | 53257db99d10bd533c134714b76965041c56cd19 (diff) |
feat(merge_panel): Add open/edit files in merge conflict panel
Diffstat (limited to 'pkg/gui/mergeconflicts/state.go')
-rw-r--r-- | pkg/gui/mergeconflicts/state.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/gui/mergeconflicts/state.go b/pkg/gui/mergeconflicts/state.go index 3d0254e15..41a072617 100644 --- a/pkg/gui/mergeconflicts/state.go +++ b/pkg/gui/mergeconflicts/state.go @@ -182,3 +182,13 @@ func (s *State) ContentAfterConflictResolve(selection Selection) (bool, string, return true, content, nil } + +func (s *State) GetSelectedLine() int { + conflict := s.currentConflict() + if conflict == nil { + return 1 + } + selection := s.Selection() + startIndex, _ := selection.bounds(conflict) + return startIndex + 1 +} |