8000 folding: handle multibyte chars in &fillchars · python-mode/python-mode@8a10b96 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8a10b96

Browse files
committed
folding: handle multibyte chars in &fillchars
This uses `matchstr`, which is multibyte aware, while `strpart` is not.
1 parent 09c3e45 commit 8a10b96

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

autoload/pymode/folding.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ let s:decorator_regex = '^\s*@'
77
let s:doc_begin_regex = '^\s*\%("""\|''''''\)'
88
let s:doc_end_regex = '\%("""\|''''''\)\s*$'
99
let s:doc_line_regex = '^\s*\("""\|''''''\).\+\1\s*$'
10-
let s:symbol = ' '
11-
if stridx(&fillchars, 'fold') > -1
12-
let s:symbol = strpart(&fillchars, stridx(&fillchars, 'fold') + 5, 1)
10+
let s:symbol = matchstr(&fillchars, 'fold:\zs.') " handles multibyte characters
11+
if s:symbol == ''
12+
let s:symbol = ' '
1313
endif
1414

1515

0 commit comments

Comments
 (0)
0