To: vim_dev@googlegroups.com Subject: Patch 8.1.2189 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.2189 Problem: Syntax highlighting wrong for tab. Solution: Don't clear syntax attribute n_extra is non-zero. Files: src/drawline.c, src/testdir/test_syntax.vim, src/testdir/dumps/Test_syntax_c_01.dump *** ../vim-8.1.2188/src/drawline.c 2019-10-19 17:37:59.588282058 +0200 --- src/drawline.c 2019-10-20 13:11:29.136376517 +0200 *************** *** 1400,1408 **** #endif #ifdef FEAT_SYN_HL - syntax_attr = 0; if (extra_check && n_extra == 0) { # ifdef FEAT_TERMINAL if (get_term_attr) syntax_attr = term_get_attr(wp->w_buffer, lnum, vcol); --- 1400,1408 ---- #endif #ifdef FEAT_SYN_HL if (extra_check && n_extra == 0) { + syntax_attr = 0; # ifdef FEAT_TERMINAL if (get_term_attr) syntax_attr = term_get_attr(wp->w_buffer, lnum, vcol); *** ../vim-8.1.2188/src/testdir/test_syntax.vim 2019-10-19 20:38:11.904991683 +0200 --- src/testdir/test_syntax.vim 2019-10-20 13:06:39.737735426 +0200 *************** *** 549,554 **** --- 549,555 ---- \ ' printf("Just an example piece of C code\n");', \ ' return 0x0ff;', \ '}', + \ "\t\t ", \ ' static void', \ 'myFunction(const double count, struct nothing, long there) {', \ "\t// 123: nothing to endif here", *************** *** 565,570 **** --- 566,572 ---- let buf = RunVimInTerminal('Xtest.c', #{rows: 22}) call term_sendkeys(buf, ":syn keyword Search Note\r") + call term_sendkeys(buf, ":syn match Error /^\\s\\+$/\r") call term_sendkeys(buf, ":set hlsearch\r") call term_sendkeys(buf, "/endif\r") call term_sendkeys(buf, "vjfC") *** ../vim-8.1.2188/src/testdir/dumps/Test_syntax_c_01.dump 2019-10-19 17:37:59.588282058 +0200 --- src/testdir/dumps/Test_syntax_c_01.dump 2019-10-20 13:14:33.839523140 +0200 *************** *** 10,15 **** --- 10,16 ---- | +0&#e0e0e08@2|p|r|i|n|t|f|(|"+0#e000002&|J|u|s|t| |a|n| |e|x|a|m|p|l|e| |p|i|e|c|e| |o|f| >C+0&#ffffff0| |c|o|d|e|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @27 @3|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|0+0#e000002&|x|0|f@1|;+0#0000000&| @58 |}| @73 + | +0#ffffff16#ff404010@16| +0#0000000#ffffff0@57 @3|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&@60 |m|y|F|u|n|c|t|i|o|n|(|c+0#00e0003&|o|n|s|t| +0#0000000&|d+0#00e0003&|o|u|b|l|e| +0#0000000&|c|o|u|n|t|,| |s+0#00e0003&|t|r|u|c|t| +0#0000000&|n|o|t|h|i|n|g|,| |l+0#00e0003&|o|n|g| +0#0000000&|t|h|e|r|e|)| |{| @14 @8|/+0#0000e05&@1| |1+0#e000002&|2|3|:+0#0000e05&| |n|o|t|h|i|n|g| |t|o| |e+0&#ffff4012|n|d|i|f| +0&#ffffff0|h|e|r|e| +0#0000000&@37 *************** *** 18,22 **** @8|}| @65 @8|N+0&#ffff4012|o|t|e|:+0&#ffffff0| |a|s|d|f| @56 |}| @73 ! |~+0#4040ff13&| @73 ! |-+2#0000000&@1| |V|I|S|U|A|L| |-@1| +0&&@34|2| @8|1|0|,|3|7| @8|A|l@1| --- 19,22 ---- @8|}| @65 @8|N+0&#ffff4012|o|t|e|:+0&#ffffff0| |a|s|d|f| @56 |}| @73 ! |-+2&&@1| |V|I|S|U|A|L| |-@1| +0&&@34|2| @8|1|0|,|3|7| @8|A|l@1| *** ../vim-8.1.2188/src/version.c 2019-10-19 22:50:17.523177438 +0200 --- src/version.c 2019-10-20 13:12:37.276060699 +0200 *************** *** 743,744 **** --- 743,746 ---- { /* Add new patch number below this line */ + /**/ + 2189, /**/ -- CART DRIVER: Bring out your dead! LARGE MAN: Here's one! CART DRIVER: Ninepence. BODY: I'm not dead! "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///