1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

Fix range select bug

After discarding file changes from the commit, the was still referencing
these indexes as being part of the range select. The consequence was
needing to hit escape twice to exit commit files in some situations.
Canceling the range select after discarding changes fixes that.
This commit is contained in:
Aaron Hoffman
2024-01-30 21:56:12 -06:00
parent d138f7ce86
commit c431698dba
2 changed files with 4 additions and 4 deletions

View File

@ -217,7 +217,10 @@ func (self *CommitFilesController) discard(selectedNodes []*filetree.CommitFileN
return err
}
return self.c.Refresh(types.RefreshOptions{Mode: types.BLOCK_UI})
if self.context().RangeSelectEnabled() {
self.context().GetList().CancelRangeSelect()
}
return self.c.Refresh(types.RefreshOptions{Mode: types.SYNC})
})
},
})