diff options
author | DLFW <daniel@llin.info> | 2021-06-28 02:56:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-27 20:56:28 -0400 |
commit | 8cefdc24500864993e66d28ba198070906161b67 (patch) | |
tree | 6f81e82b1a5777601fa55cebd6c0c9c187fec105 /src/util | |
parent | fe87911dbbdd0c20acef825a0bb6213e011fca02 (diff) |
highlight invalid symlinks (#80)
* own display style for invalid symlinks
* add link_invalid to default theme.toml
* footer shows link target in link style
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/style.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util/style.rs b/src/util/style.rs index 69a3704..5627444 100644 --- a/src/util/style.rs +++ b/src/util/style.rs @@ -17,10 +17,14 @@ pub fn entry_style(entry: &JoshutoDirEntry) -> Style { .add_modifier(THEME_T.selection.modifier) } else { match linktype { - LinkType::Symlink(_) => Style::default() + LinkType::Symlink(_, true) => Style::default() .fg(THEME_T.link.fg) .bg(THEME_T.link.bg) .add_modifier(THEME_T.link.modifier), + LinkType::Symlink(_, false) => Style::default() + .fg(THEME_T.link_invalid.fg) + .bg(THEME_T.link_invalid.bg) + .add_modifier(THEME_T.link_invalid.modifier), LinkType::Normal => match filetype { FileType::Directory => Style::default() .fg(THEME_T.directory.fg) |