Mercurial > vim
changeset 26009:990958e8c3a2
patch 8.2.3538: else-if indenting is confusing
Commit: https://github.com/vim/vim/commit/d43d8e28db9afe693002a39e003ba1ece1a8319a
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Tue Oct 19 13:44:52 2021 +0100
patch 8.2.3538: else-if indenting is confusing
Problem: Else-if indenting is confusing.
Solution: Add curly brackets. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/9017)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 19 Oct 2021 14:45:03 +0200 |
parents | 7a335021103c |
children | 2fafae9c79e8 |
files | src/highlight.c src/version.c |
diffstat | 2 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/highlight.c +++ b/src/highlight.c @@ -2819,10 +2819,12 @@ highlight_has_attr( attr = HL_TABLE()[id - 1].sg_gui; else #endif - if (modec == 'c') - attr = HL_TABLE()[id - 1].sg_cterm; - else - attr = HL_TABLE()[id - 1].sg_term; + { + if (modec == 'c') + attr = HL_TABLE()[id - 1].sg_cterm; + else + attr = HL_TABLE()[id - 1].sg_term; + } if (attr & flag) return (char_u *)"1";