1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-10 04:07:18 +02:00
lazygit/pkg
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
..
app Make it possible to handle toasts in integration tests 2024-01-14 17:42:03 +01:00
cheatsheet Make it possible to handle toasts in integration tests 2024-01-14 17:42:03 +01:00
commands Standardise display of range selection across views 2024-01-19 10:47:21 +11:00
common Add AppState to common.Common 2023-09-04 17:48:39 +02:00
config Support select range for cherry pick 2024-01-19 10:50:49 +11:00
constants
env Support bare worktrees where worktree does not have its own .git file 2023-08-07 22:40:53 +10:00
fakes
gui Show file names in default colour (#3081) 2024-01-22 13:40:19 +11:00
i18n Enforce single-item selection in various actions 2024-01-19 10:50:49 +11:00
integration Keep same branch selected when refreshing branches 2024-01-19 09:25:07 +01:00
jsonschema Add UserConfig jsonschema generation script 2023-12-02 10:46:24 +01:00
logs
snake
tasks
theme Standardise display of range selection across views 2024-01-19 10:47:21 +11:00
updates
utils Add range selection ability on list contexts 2024-01-19 10:47:21 +11:00