]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(python): Update syntax, fix pythonEllipsis pattern
authorDoug Kearns <dougkearns@gmail.com>
Thu, 11 Sep 2025 17:54:51 +0000 (13:54 -0400)
committerChristian Brabandt <cb@256bit.org>
Thu, 11 Sep 2025 17:54:51 +0000 (13:54 -0400)
fixes: #18263
closes: #18264

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/syntax/python.vim
runtime/syntax/testdir/dumps/python_ellipsis_01.dump
runtime/syntax/testdir/dumps/python_ellipsis_02.dump
runtime/syntax/testdir/input/python_ellipsis.py

index 542805d8497b1e3abe4be6f36fe0d12e58244e91..86aa6d3296fafc0965994aac4b360d8ee894f771 100644 (file)
@@ -314,7 +314,7 @@ if !exists("python_no_builtin_highlight")
        \ contains=ALLBUT,pythonBuiltin,pythonClass,pythonFunction,pythonType,pythonAsync
        \ transparent
   " the ellipsis literal `...` can be used in multiple syntactic contexts
-  syn match   pythonEllipsis   "\.\@1<!.\.\.\ze\.\@!" display
+  syn match   pythonEllipsis   "\.\@1<!\.\.\.\ze\.\@!" display
 endif
 
 " From the 'Python Library Reference' class hierarchy at the bottom.
index f1495fd336a37bc6d6d866a580cf16c262423f55..03a7de81cb98590a81cbefbc9cef58aeb1c7ce6f 100644 (file)
@@ -17,4 +17,4 @@
 |[+0#e000e06&|0|,| |1|,| |.+0#00e0e07&@2|,+0#e000e06&| |1|8|,| |1|9|]| +0#0000000&@55
 |>+0#e000e06&@2| |e+0#00e0e07&|x|e|c|(+0#0000000&|s|)| +0#e000e06&@1|#+0#0000e05&|d|o|c|t|e|s|t|:| |+|E|L@1|I|P|S|I|S| +0#0000000&@42
 |-+0#e000e06&|3|.|2|1|7|1|6|0|3|4|2|7|2|e|-|0|.+0#00e0e07&@2|7+0#e000e06&| +0#0000000&@53
-@57|1|9|,|1| @9|5|4|%| 
+@57|1|9|,|1| @9|4|8|%| 
index 7a7417a7702625483009d78c71195ee73f643239..8c97c30b41a8302265a0c57a3920100d8b944acf 100644 (file)
 @75
 |#+0#0000e05&| |N|u|m|p|y| +0#0000000&@67
 |x|[|.+0#00e0e07&@2|,+0#0000000&| |0+0#e000002&|]+0#0000000&| @65
+@75
+|#+0#0000e05&| |I|s@1|u|e| |#|1|8|2|6|3| |(|P|y|t|h|o|n| |h|i|g|h|l|i|g|h|t|i|n|g| |e|l@1|i|p|s|i|s|,| |f|a|l|s|e| |p|o|s|i|t|i|v|e|)| +0#0000000&@13
+|a| |=| |"+0#e000002&|.@1|"| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@56
 |~+0#4040ff13&| @73
 |~| @73
 |~| @73
 |~| @73
-|~| @73
-|~| @73
-|~| @73
 | +0#0000000&@56|3|7|,|2|-|9| @7|B|o|t| 
index 525328305ce70dbe47714784083702572d7a27c0..ac8ecc3932b6337cb6db2af45195d4fb6f2c787b 100644 (file)
@@ -41,3 +41,6 @@ class C:
 
 # Numpy
 x[..., 0]
+
+# Issue #18263 (Python highlighting ellipsis, false positive)
+a = ".." # comment