diff src/highlight.c @ 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 8fceae196d4f
children 09a273f0af05
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";