lazygit/pkg/gui/controllers
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
..
helpers Standardise display of range selection across views 2024-01-19 10:47:21 +11:00
attach.go Begin refactoring gui 2023-04-30 13:19:52 +10:00
base_controller.go Begin refactoring gui 2023-04-30 13:19:52 +10:00
basic_commits_controller.go Add command to open git difftool 2024-01-09 14:27:33 +01:00
bisect_controller.go When bisecting, always mark the current commit as good/bad, not the selected 2023-07-29 14:44:00 +02:00
branches_controller.go Make DisabledReason a struct 2024-01-14 17:45:35 +01:00
command_log_controller.go lots of changes 2023-04-30 13:19:53 +10:00
commit_description_controller.go Add key binding for switching from the commit message panel to an editor 2023-08-21 10:03:34 +02:00
commit_message_controller.go Add key binding for switching from the commit message panel to an editor 2023-08-21 10:03:34 +02:00
commits_files_controller.go Add command to open git difftool 2024-01-09 14:27:33 +01:00
common.go lots of changes 2023-04-30 13:19:53 +10:00
confirmation_controller.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
context_lines_controller.go Move diff context size from UserConfig to AppState 2023-09-05 13:55:30 +02:00
custom_command_action.go Standardise on using lo for slice functions 2023-07-30 18:51:23 +10:00
custom_patch_options_menu_action.go Show error when trying to open patch menu with an empty patch 2023-07-26 14:27:18 +02:00
diffing_menu_action.go fix: typo EnteRefName 2023-06-28 18:54:21 +06:00
files_controller.go Standardise display of range selection across views 2024-01-19 10:47:21 +11:00
files_remove_controller.go Support custom keybindings for confirm discard 2023-08-25 08:50:05 -05:00
filter_controller.go Introduce filtered list view model 2023-07-03 12:54:13 +10:00
filtering_menu_action.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
git_flow_controller.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
global_controller.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
jump_to_side_window_controller.go move side window actions to controllers package 2023-04-30 13:19:53 +10:00
list_controller.go Add range selection ability on list contexts 2024-01-19 10:47:21 +11:00
local_commits_controller.go Allow showing Disabled errors as error panel instead of toast 2024-01-14 17:45:35 +01:00
menu_controller.go Add DisabledReason field to MenuItem 2023-09-18 10:15:11 +02:00
merge_conflicts_controller.go Standardise display of range selection across views 2024-01-19 10:47:21 +11:00
options_menu_action.go Do not include keybindings from another view in keybindings menu 2024-01-15 20:08:11 +11:00
patch_building_controller.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
patch_explorer_controller.go Support non-sticky range selection in patch explorer views 2024-01-19 10:47:21 +11:00
quit_actions.go Update repo switch logic 2023-07-30 18:35:23 +10:00
reflog_commits_controller.go Don't pass ignoreWhitespace to git commands 2023-09-04 17:50:49 +02:00
remote_branches_controller.go Add a sort order menu for local branches 2023-12-27 15:25:29 +01:00
remotes_controller.go feat: add jump-to-panel label setting 2023-09-09 09:45:08 +02:00
screen_mode_actions.go Remove special code to rerender views on screen mode change 2023-10-16 09:03:07 +02:00
scroll_off_margin.go Add scrollOffEnabled config 2023-08-21 09:03:45 +02:00
scroll_off_margin_test.go Add tests for scroll-off margin of zero 2023-08-21 08:10:28 +02:00
search_controller.go Introduce filtered list view model 2023-07-03 12:54:13 +10:00
search_prompt_controller.go Add search history 2023-09-20 08:35:41 +03:00
side_window_controller.go move side window actions to controllers package 2023-04-30 13:19:53 +10:00
snake_controller.go lots of changes 2023-04-30 13:19:53 +10:00
staging_controller.go Rename "Delete change" menu entry to "Discard change" in staging panel 2023-06-26 08:19:58 +02:00
stash_controller.go Don't pass ignoreWhitespace to git commands 2023-09-04 17:50:49 +02:00
status_controller.go Pass "now" into utils.Loader 2023-10-16 09:03:07 +02:00
sub_commits_controller.go Don't pass ignoreWhitespace to git commands 2023-09-04 17:50:49 +02:00
submodules_controller.go Don't pass ignoreWhitespace to git commands 2023-09-04 17:50:49 +02:00
suggestions_controller.go lots of changes 2023-04-30 13:19:53 +10:00
switch_to_diff_files_controller.go feat: add jump-to-panel label setting 2023-09-09 09:45:08 +02:00
switch_to_sub_commits_controller.go Add "Show divergence from upstream" entry to Upstream menu in branches panel 2023-08-29 08:16:40 +02:00
sync_controller.go Make DisabledReason a struct 2024-01-14 17:45:35 +01:00
tags_controller.go Fix checking out a tag when a branch with the same name exists 2024-01-09 14:18:35 +01:00
toggle_whitespace_action.go Extract a SaveAppStateAndLogError function 2023-09-04 17:50:49 +02:00
types.go introduce Ref interface 2022-04-02 17:04:42 +11:00
undo_controller.go Replace uses of "git stash save" with "git stash push" 2023-07-10 15:09:17 +02:00
vertical_scroll_controller.go lots of changes 2023-04-30 13:19:53 +10:00
workspace_reset_controller.go Reset origin when clearing view 2023-08-08 22:01:43 +10:00
worktree_options_controller.go Support creating worktrees from refs 2023-07-30 18:35:22 +10:00
worktrees_controller.go Use fields rather than methods on worktrees 2023-07-30 18:35:24 +10:00