mirror of
https://github.com/vim/vim.git
synced 2026-10-01 13:56:56 +02:00
Problem: s:SearchBracket()'s skip-expression matches syntax group
names ending in "Comment", "Todo", or "String" to decide
whether a candidate bracket is inside a string/comment
and should be skipped for indentation purposes. Byte and
raw-byte string literals (b"...", rb"...") are highlighted
via the pythonBytes/pythonRawBytes syntax groups, which
don't end in "String", so brackets inside them (e.g.
b"[") were never skipped and were counted as real,
unmatched brackets, producing incorrect indentation.
Solution: Add "Bytes" to the indent script's existing suffix match,
so pythonBytes/pythonRawBytes are recognized directly, the
same way pythonString/pythonFString/pythonRawString
already are.
This supersedes an earlier version of this fix that
renamed pythonBytes/pythonRawBytes to
pythonBytesString/pythonRawBytesString in
runtime/syntax/python.vim.
fixes: #20812
closes: #20827
Signed-off-by: qwavies <qwavsbusiness@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
21 lines
922 B
Plaintext
Generated
21 lines
922 B
Plaintext
Generated
|t+0&#ffffff0|e|s|t| |=| |r+0#e000002&|b|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |b|r|a|c|k|e|t| |(|"| +0#0000000&@39
|
|
|t|e|s|t| |=| |r+0#e000002&|b|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |b|r|a|c|k|e|t| |{|"| +0#0000000&@39
|
|
|t|e|s|t| |=| |R+0#e000002&|b|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |b|r|a|c|k|e|t| |[|"| +0#0000000&@39
|
|
|t|e|s|t| |=| |R+0#e000002&|b|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |b|r|a|c|k|e|t| |(|"| +0#0000000&@39
|
|
|t|e|s|t| |=| |R+0#e000002&|b|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |b|r|a|c|k|e|t| |{|"| +0#0000000&@39
|
|
>t|e|s|t| |=| |b+0#e000002&|R|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |b|r|a|c|k|e|t| |[|"| +0#0000000&@39
|
|
|t|e|s|t| |=| |b+0#e000002&|R|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |b|r|a|c|k|e|t| |(|"| +0#0000000&@39
|
|
|t|e|s|t| |=| |b+0#e000002&|R|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |b|r|a|c|k|e|t| |{|"| +0#0000000&@39
|
|
@75
|
|
@75
|
|
@75
|
|
|~+0#4040ff13&| @73
|
|
|~| @73
|
|
|~| @73
|
|
|~| @73
|
|
|~| @73
|
|
|~| @73
|
|
|~| @73
|
|
|~| @73
|
|
| +0#0000000&@56|2|5|9|,|1| @8|B|o|t|
|