mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02:00
Handle wrapped lines in patch explorer state
So far, lines in the view corresponded 1:1 to lines in the patch. Once we turn on wrapping for the staging view (which we don't do yet), this is no longer true, so we need to convert from view lines to patch lines or vice versa all over the place.
This commit is contained in:
parent
b7444b9a49
commit
5213a9de32
7 changed files with 64 additions and 30 deletions
|
@ -91,7 +91,7 @@ func (self *PatchBuildingHelper) RefreshPatchBuildingPanel(opts types.OnFocusOpt
|
|||
|
||||
oldState := context.GetState()
|
||||
|
||||
state := patch_exploring.NewState(diff, selectedLineIdx, oldState)
|
||||
state := patch_exploring.NewState(diff, selectedLineIdx, context.GetView(), oldState)
|
||||
context.SetState(state)
|
||||
if state == nil {
|
||||
self.Escape()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue