Skip to content

Commit

Permalink
Fix incorrect filename coloring in tig status
Browse files Browse the repository at this point in the history
Due to the way commit a37ce5c updated
src/draw.c:draw_filename() the whole line in `tig status` got colored
according to `stat-*` which supposed to color only status markers.
  • Loading branch information
xaizek committed Apr 7, 2024
1 parent d4a13ff commit 74f534f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,13 @@ view_column_draw(struct view *view, struct line *line, unsigned int lineno)
continue;

case VIEW_COLUMN_FILE_NAME:
if (draw_filename(view, column, line->type, column_data.file_name))
{
enum line_type type = line->type;
if (view->ops->flags & VIEW_STATUS_LIKE)
type = S_ISDIR(mode) ? LINE_DIRECTORY : LINE_FILE;
if (draw_filename(view, column, type, column_data.file_name))
return true;
}
continue;

case VIEW_COLUMN_SECTION:
Expand Down

0 comments on commit 74f534f

Please sign in to comment.