jesseduffield.lazygit/pkg/gui/presentation
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
..
authors Right-align key labels in menu 2023-05-21 12:09:43 +10:00
graph Standardise on using lo for slice functions 2023-07-30 18:51:23 +10:00
icons create iconProperties struct and convert iconMaps to use iconProperties 2023-10-18 21:21:36 +11:00
branches.go Don't try to shorten branch names that are already 3 characters or less 2024-01-15 13:27:49 +01:00
branches_test.go Don't try to shorten branch names that are already 3 characters or less 2024-01-15 13:27:49 +01:00
commits.go Add "Show divergence from upstream" entry to Upstream menu in branches panel 2023-08-29 08:16:40 +02:00
commits_test.go Make RenderDisplayStrings return the column positions 2023-08-28 14:21:06 +02:00
files.go Show unstaged file names in default colour 2024-01-22 13:31:05 +11:00
files_test.go Show unstaged file names in default colour 2024-01-22 13:31:05 +11:00
item_operations.go Fall back to WithWaitingStatus if view showing the item is not visible 2023-12-10 15:57:51 +01:00
reflog_commits.go Standardise on using lo for slice functions 2023-07-30 18:51:23 +10:00
remote_branches.go Standardise on using lo for slice functions 2023-07-30 18:51:23 +10:00
remotes.go Standardise on using lo for slice functions 2023-07-30 18:51:23 +10:00
stash_entries.go feat: add age on stash lines 2023-12-27 11:21:49 +01:00
status.go Add inline status for pushing/pulling/fast-forwarding branches 2023-10-08 18:45:36 +02:00
submodules.go Standardise on using lo for slice functions 2023-07-30 18:51:23 +10:00
suggestions.go Standardise on using lo for slice functions 2023-07-30 18:51:23 +10:00
tags.go Fall back to WithWaitingStatus if view showing the item is not visible 2023-12-10 15:57:51 +01:00
working_tree.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
worktrees.go Use fields rather than methods on worktrees 2023-07-30 18:35:24 +10:00