diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-02 17:26:35 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-02 17:26:35 +0100 |
commit | c85ffc9daba6f66d5958ae80249d26f7f81bfced (patch) | |
tree | dd42607681037eb5ec82150158d7a3e7c3fbfd76 | |
parent | 2cbc1a02cb72916dfdbd0d307512c7c3fb766edf (diff) | |
download | vim-git-c85ffc9daba6f66d5958ae80249d26f7f81bfced.tar.gz |
patch 8.1.0680: not easy to see what features are unavailablev8.1.0680
Problem: Not easy to see what features are unavailable.
Solution: Highlight disabled features in the :version output. (Nazri Ramliy,
closes #3756)
-rw-r--r-- | src/version.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/version.c b/src/version.c index 2571a8c96..8dcd56f42 100644 --- a/src/version.c +++ b/src/version.c @@ -800,6 +800,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 680, +/**/ 679, /**/ 678, @@ -2266,6 +2268,9 @@ list_in_columns(char_u **items, int size, int current) int nrow; int item_count = 0; int width = 0; +#ifdef FEAT_SYN_HL + int use_highlight = (items == (char_u **)features); +#endif /* Find the length of the longest item, use that + 1 as the column * width. */ @@ -2307,7 +2312,12 @@ list_in_columns(char_u **items, int size, int current) if (idx == current) msg_putchar('['); - msg_puts(items[idx]); +#ifdef FEAT_SYN_HL + if (use_highlight && items[idx][0] == '-') + msg_puts_attr(items[idx], HL_ATTR(HLF_W)); + else +#endif + msg_puts(items[idx]); if (idx == current) msg_putchar(']'); if (last_col) |