Skip to content

Commit 23cab17

Browse files
committed
Ticket #XXXX: fix filename background color when scrolling
Signed-off-by: Yury V. Zaytsev <[email protected]>
1 parent da9cc3f commit 23cab17

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

Diff for: src/filemanager/panel.c

+13-2
Original file line numberDiff line numberDiff line change
@@ -853,8 +853,14 @@ repaint_file (WPanel *panel, int file_index, file_attr_t attr)
853853
}
854854
}
855855

856+
const int file_color =
857+
attr == FATTR_CURRENT || attr == FATTR_MARKED_CURRENT ? SELECTED_COLOR : NORMAL_COLOR;
858+
859+
const int scroll_left_char_color =
860+
panel->list_format == list_long ? file_color : NORMAL_COLOR;
861+
856862
widget_gotoyx (w, ypos, offset);
857-
tty_setcolor (NORMAL_COLOR);
863+
tty_setcolor (scroll_left_char_color);
858864
tty_print_string (panel_filename_scroll_left_char);
859865

860866
if ((ret_frm & FILENAME_SCROLL_RIGHT) != 0)
@@ -863,8 +869,13 @@ repaint_file (WPanel *panel, int file_index, file_attr_t attr)
863869
if (nth_column + 1 >= panel->list_cols)
864870
offset++;
865871

872+
const int scroll_right_char_color =
873+
panel->list_format != list_long && g_slist_length (panel->format) > 2
874+
? file_color
875+
: NORMAL_COLOR;
876+
866877
widget_gotoyx (w, ypos, offset);
867-
tty_setcolor (NORMAL_COLOR);
878+
tty_setcolor (scroll_right_char_color);
868879
tty_print_string (panel_filename_scroll_right_char);
869880
}
870881
}

0 commit comments

Comments
 (0)