jesseduffield.lazygit/pkg/gui/context
Jesse Duffield c2218133bc
Show file names in default colour (#3081)
Fixes https://github.com/jesseduffield/lazygit/issues/3077

Show unstaged file names in default colour

Previously, we had the following rules:
* file names were in red when unstaged or partially staged
* directory names were in red if unstaged, yellow if partially staged,
and
  green if fully staged

Red text on a black background can be hard to read, so instead I'm
changing it
so that unstaged files have their names in the default text colour.
I'm also making it so that partially staged files are in yellow, just
like how
partially staged directories are yellow (same deal with the commit files
view
when adding to a custom patch).

So the new rules are:
* unstaged files/directories use the default colour
* partially staged files/directories are in yellow
* fully staged files/directories are in green

I've also done a refactor on the code clean up some dead code from when
the file tree
outline was drawn with box characters, and I've made it so that the
indentation in
each line is handled inside the function that draws the line rather than
in the recursive
parent function. This makes it easier to experiment with things like
showing the file
status characters on the left edge of the view (admittedly after
experimenting with it,
I decided I didn't like it). Apologies for having a refactor and a
functional change
in the one commit but by the time I was done, I couldn't be bothered
going back and
retroactively splitting it into two halves.
2024-01-22 13:40:19 +11:00
..
traits Enforce single-item selection in various actions 2024-01-19 10:50:49 +11:00
base_context.go Rerender certain views when their width changes 2023-10-16 09:03:07 +02:00
branches_context.go Truncate long branch names to make branch status visible 2023-10-16 13:15:05 +02:00
commit_files_context.go Show file names in default colour (#3081) 2024-01-22 13:40:19 +11:00
commit_message_context.go Mention ctrl+o binding in commit message sub title 2023-08-21 10:03:34 +02:00
confirmation_context.go split context common from helper common 2023-04-30 13:19:53 +10:00
context.go Layout the bottom line view using spacer views 2023-12-09 11:18:28 +01:00
context_common.go split context common from helper common 2023-04-30 13:19:53 +10:00
dynamic_title_builder.go show namesake for child views 2022-03-26 18:00:46 +11:00
filtered_list.go When refreshing models, re-apply active filter for the corresponding view 2023-10-10 08:37:30 +02:00
filtered_list_view_model.go Add SetSelection function for list contexts and use it in most places 2024-01-19 10:47:21 +11:00
history_trait.go Add search history 2023-09-20 08:35:41 +03:00
list_context_trait.go Disable range-select in menu and suggestions view 2024-01-19 10:50:49 +11:00
list_renderer.go Add a mechanism to insert non-model items into list contexts 2023-08-29 08:04:47 +02:00
list_renderer_test.go Add a mechanism to insert non-model items into list contexts 2023-08-29 08:04:47 +02:00
list_view_model.go Fall back to WithWaitingStatus if item is scrolled out of view 2023-12-10 16:03:25 +01:00
local_commits_context.go Add SetSelection function for list contexts and use it in most places 2024-01-19 10:47:21 +11:00
menu_context.go Disable range-select in menu and suggestions view 2024-01-19 10:50:49 +11:00
merge_conflicts_context.go Standardise display of range selection across views 2024-01-19 10:47:21 +11:00
parent_context_mgr.go refactor contexts code 2022-03-17 19:13:40 +11:00
patch_explorer_context.go Standardise display of range selection across views 2024-01-19 10:47:21 +11:00
reflog_commits_context.go Rerender certain views when their width changes 2023-10-16 09:03:07 +02:00
remote_branches_context.go Rerender certain views when their width changes 2023-10-16 09:03:07 +02:00
remotes_context.go Fix crash when trying to filter the list of remotes 2023-10-10 08:33:18 +02:00
search_trait.go Don't select current search result when showing search status 2023-09-25 16:37:59 +10:00
setup.go Layout the bottom line view using spacer views 2023-12-09 11:18:28 +01:00
simple_context.go remove context callback opts 2023-04-30 13:19:53 +10:00
stash_context.go Extract a ListRenderer struct 2023-08-28 14:21:06 +02:00
sub_commits_context.go Add SetSelection function for list contexts and use it in most places 2024-01-19 10:47:21 +11:00
submodules_context.go Extract a ListRenderer struct 2023-08-28 14:21:06 +02:00
suggestions_context.go Disable range-select in menu and suggestions view 2024-01-19 10:50:49 +11:00
tags_context.go Add inline status for pushing tags and deleting remote tags 2023-10-08 18:45:36 +02:00
view_trait.go Add range selection ability on list contexts 2024-01-19 10:47:21 +11:00
working_tree_context.go Show file names in default colour (#3081) 2024-01-22 13:40:19 +11:00
worktrees_context.go Extract a ListRenderer struct 2023-08-28 14:21:06 +02:00