Skip to content

Commit 5cfa952

Browse files
committed
Fixed hex error display
1 parent b6d761f commit 5cfa952

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

python.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ if exists("python_highlight_doctests") && python_highlight_doctests != 0
209209
endif
210210

211211
" Numbers (ints, longs, floats, complex)
212+
syn match pythonHexError "\<0[xX]\x*[g-zG-Z]\x*[lL]\=\>" display
213+
212214
syn match pythonHexNumber "\<0[xX]\x\+[lL]\=\>" display
213215
syn match pythonOctNumber "\<0[oO]\o\+[lL]\=\>" display
214216
syn match pythonBinNumber "\<0[bB][01]\+[lL]\=\>" display
@@ -220,7 +222,6 @@ syn match pythonFloat "\<\d\+[eE][+-]\=\d\+[jJ]\=\>" display
220222
syn match pythonFloat "\<\d\+\.\d*\([eE][+-]\=\d\+\)\=[jJ]\=" display
221223

222224
syn match pythonOctError "\<0[oO]\=\o*[8-9]\d*[lL]\=\>" display
223-
syn match pythonHexError "\<0[xX]\x*[g-zG-Z]\x*[lL]\=\>" display
224225
syn match pythonBinError "\<0[bB][01]*[2-9]\d*[lL]\=\>" display
225226

226227
if exists("python_highlight_builtins") && python_highlight_builtins != 0

test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class classname
4848

4949
# Numbers
5050

51-
0 0x1f 077 .3 12.34 100L 0j 0j 34.2E-3 0b10 0o77
51+
0 0x1f 077 .3 12.34 100L 0j 0j 34.2E-3 0b10 0o77 0xfffffffL
5252

5353
# Erroneous numbers
5454

0 commit comments

Comments
 (0)