mirror of
https://github.com/neovim/neovim.git
synced 2026-02-17 18:01:16 +10:00
vim-patch:c68e64d: runtime(sh): fix spurious nextgroup=shComment on shEscape
Remove `nextgroup=shComment` from the `shEscape` syntax pattern.
This was causing `#` characters after escape sequences inside
double-quoted strings to be misinterpreted as comments, breaking
highlighting for the rest of the file.
Add a test case for escaped characters followed by # in double quotes.
fixes: vim/vim#19053
closes: vim/vim#19414
c68e64dac3
Co-authored-by: Bozhidar Batsov <bozhidar@batsov.dev>
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
" 2025 Sep 23 simplify ksh logic, update sh statements #18355
|
||||
" 2026 Jan 15 highlight command switches that contain a digit
|
||||
" 2026 Feb 11 improve support for KornShell function names and variables
|
||||
" 2026 Feb 15 improve comment handling #19414
|
||||
" }}}
|
||||
" Version: 208
|
||||
" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
|
||||
@@ -452,7 +453,7 @@ endif
|
||||
"======
|
||||
syn match shWrapLineOperator "\\$"
|
||||
syn region shCommandSubBQ start="`" skip="\\\\\|\\." end="`" contains=shBQComment,@shCommandSubList
|
||||
syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.' nextgroup=shComment
|
||||
syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.'
|
||||
|
||||
" $() and $(()): {{{1
|
||||
" $(..) is not supported by sh (Bourne shell). However, apparently
|
||||
|
||||
Reference in New Issue
Block a user