From 2ab58f3d8c3172a1d045efb76010b88f3537af08 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 23 Feb 2020 18:13:33 -0800 Subject: [PATCH] Fixed color issue with column separator after '*' column --- columns.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/columns.h b/columns.h index be47304..e8b92be 100644 --- a/columns.h +++ b/columns.h @@ -113,7 +113,9 @@ void col_ctime(bb_t *bb, entry_t *entry, char *buf, int width) { void col_selected(bb_t *bb, entry_t *entry, char *buf, int width) { (void)bb; (void)width; - strcpy(buf, IS_SELECTED(entry) ? SELECTED_INDICATOR : NOT_SELECTED_INDICATOR); + buf = stpcpy(buf, IS_SELECTED(entry) ? SELECTED_INDICATOR : NOT_SELECTED_INDICATOR); + buf = stpcpy(buf, entry == bb->files[bb->cursor] ? + CURSOR_COLOR : color_of(entry->info.st_mode)); } void col_perm(bb_t *bb, entry_t *entry, char *buf, int width) {