1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-05 00:59:19 +02:00
Commit Graph

11 Commits

Author SHA1 Message Date
54bd94ad24 Add SetSelection function for list contexts and use it in most places
The only time we should call SetSelectedLineIdx is when we are happy for a
select range to be retained which means things like moving the selected line
index to top top/bottom or up/down a page as the user navigates.

But in every other case we should now call SetSelection because that will
set the selected index and cancel the range which is almost always what we
want.
2024-01-19 10:47:21 +11:00
24a4302c52 Add range selection ability on list contexts
This adds range select ability in two ways:
1) Sticky: like what we already have with the staging view i.e. press v then use arrow keys
2) Non-sticky: where you just use shift+up/down to expand the range

The state machine works like this:
(no range, press 'v') -> sticky range
(no range, press arrow) -> no range
(no range, press shift+arrow) -> nonsticky range
(sticky range, press 'v') -> no range
(sticky range, press arrow) -> sticky range
(sticky range, press shift+arrow) -> nonsticky range
(nonsticky range, press 'v') -> no range
(nonsticky range, press arrow) -> no range
(nonsticky range, press shift+arrow) -> nonsticky range
2024-01-19 10:47:21 +11:00
13326344f0 Support filtering files 2023-07-03 12:54:13 +10:00
a9e2c8129f Introduce filtered list view model
We're going to start supporting filtering of list views
2023-07-03 12:54:13 +10:00
d93fef4c61 use generics to DRY up context code 2022-03-19 12:12:57 +11:00
ef7c4c9ca9 refactor custom commands
more custom command refactoring
2022-03-17 19:13:40 +11:00
c084abb378 move more view model logic into the files view model 2022-03-17 19:13:40 +11:00
8ea7b7a62e migrate files context to new structure 2022-03-17 19:13:40 +11:00
fa2e7ae1e7 show only merge conflict files when there are merge conflicts 2022-01-26 20:28:32 +11:00
c8cc18920f improve merge conflict flow 2022-01-26 14:50:47 +11:00
5b7dd9e43c properly resolve cyclic dependency 2022-01-22 10:48:51 +11:00