1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
lazygit/pkg/commands
Jesse Duffield f3eb180f75 Standardise display of range selection across views
We're not fully standardising here: different contexts can store their range state however
they like. What we are standardising on is that now the view is always responsible for
highlighting the selected lines, meaning the context/controller needs to tell the view
where the range start is.

Two convenient benefits from this change:
1) we no longer need bespoke code in integration tests for asserting on selected lines because
we can just ask the view
2) line selection in staging/patch-building/merge-conflicts views now look the same as in
list views i.e. the highlight applies to the whole line (including trailing space)

I also noticed a bug with merge conflicts not rendering the selection on focus though I suspect
it wasn't a bug with any real consequences when the view wasn't displaying the selection.

I'm going to scrap the selectedRangeBgColor config and just let it use the single line
background color. Hopefully nobody cares, but there's really no need for an extra config.
2024-01-19 10:47:21 +11:00
..
git_commands Obtain remote URL by calling "ls-remote --get-url" instead of using git config 2024-01-10 09:24:23 +01:00
git_config Remove secureexec package 2023-07-30 19:59:51 +10:00
hosting_service Remove redundant len check 2023-10-04 21:03:26 +08:00
models feat: add age on stash lines 2023-12-27 11:21:49 +01:00
oscommands Appease linter 2023-08-02 08:32:57 +10:00
patch Standardise display of range selection across views 2024-01-19 10:47:21 +11:00
testdata
types/enums more refactoring 2022-01-04 09:07:15 +11:00
git_cmd_obj_builder.go Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
git_cmd_obj_runner.go Retry on index.lock error 2023-07-10 19:13:18 +10:00
git_test.go Write unit tests with the help of afero 2023-07-30 18:35:36 +10:00
git.go Add command to find base commit for creating a fixup 2024-01-10 09:11:40 +01:00