diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2025-09-09 11:36:47 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2025-09-09 11:37:12 +0800 |
| commit | 53e78bec7c60fea67ef4ef05ada11ab3c058b0eb (patch) | |
| tree | 241f99b21d3afcc44ac2a308dca470b18f20a104 /runtime/syntax/python.vim | |
| parent | eb19206e032a9798e68de1d76f02e568d8e076f4 (diff) | |
vim-patch:6bb16d2: runtime(python): Update syntax file, fix f-string float highlighting
Fix matching of floats at the beginning of an f-string replacement
field, immediately after the opening brace.
The existing pattern, using `\zs`, cannot consume the already matched
`{` so use a lookbehind instead.
See comment: https://github.com/vim/vim/pull/17962#issuecomment-3201550443
closes: vim/vim#18220
https://github.com/vim/vim/commit/6bb16d2cee87f834f003bf368ce70c5688242ac1
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Diffstat (limited to 'runtime/syntax/python.vim')
| -rw-r--r-- | runtime/syntax/python.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/syntax/python.vim b/runtime/syntax/python.vim index b2f866b8b3..2382690531 100644 --- a/runtime/syntax/python.vim +++ b/runtime/syntax/python.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Python " Maintainer: Zvezdan Petkovic <zpetkovic@acm.org> -" Last Change: 2025 Sep 05 +" Last Change: 2025 Sep 08 " Credits: Neil Schemenauer <nas@python.ca> " Dmitry Vasiliev " Rob B @@ -271,7 +271,7 @@ if !exists("python_no_number_highlight") syn match pythonNumber \ "\<\d\%(_\=\d\)*\.\%([eE][+-]\=\d\%(_\=\d\)*\)\=[jJ]\=\%(\W\|$\)\@=" syn match pythonNumber - \ "\%(^\|\W\)\zs\%(\d\%(_\=\d\)*\)\=\.\d\%(_\=\d\)*\%([eE][+-]\=\d\%(_\=\d\)*\)\=[jJ]\=\>" + \ "\%(^\|\W\)\@1<=\%(\d\%(_\=\d\)*\)\=\.\d\%(_\=\d\)*\%([eE][+-]\=\d\%(_\=\d\)*\)\=[jJ]\=\>" endif " Group the built-ins in the order in the 'Python Library Reference' for |
