7 Commits
Author SHA1 Message Date
qwavies f88e7191da runtime(python): Fix indenting for brackets within python byte strings
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>
2026-07-26 14:28:29 +00:00
Aliaksei Budavei 4e3df44aa2 runtime(indent-tests): Annotate timed "search*()"es for tracing
related: #17116

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-19 11:35:38 +02:00
Bram Moolenaar dd60c365cd Update runtime files 2023-02-27 15:49:53 +00:00
Bram Moolenaar fd999452ad Update runtime files 2022-08-24 18:30:14 +01:00
Bram Moolenaar e80086446c Update runtime files 2022-08-19 17:15:35 +01:00
Bram Moolenaar 48c3f4e0bf Update runtime files 2022-08-08 15:42:38 +01:00
Bram Moolenaar b529cfbd04 Update runtime files 2022-07-25 15:42:07 +01:00