mirror of
https://github.com/Raimondi/delimitMate.git
synced 2026-10-28 08:33:21 +08:00
Consider non ascii chars for smart quote.
This commit is contained in:
1 parent
e17f6cd23c
commit
eb2625c4a7
1 file changed
+3
-2
@@ -244,8 +244,9 @@ function! delimitMate#IsSmartQuote(char) "{{{
|
|||||||
endif
|
endif
|
||||||
let char_at = delimitMate#GetCharFromCursor(0)
|
let char_at = delimitMate#GetCharFromCursor(0)
|
||||||
let char_before = delimitMate#GetCharFromCursor(-1)
|
let char_before = delimitMate#GetCharFromCursor(-1)
|
||||||
let word_before = char_before =~ '\w\|[^[:punct:]]'
|
let valid_char_re = '\w\|[^[:punct:]]'
|
||||||
let word_at = char_at =~ '\w'
|
let word_before = char_before =~ valid_char_re
|
||||||
|
let word_at = char_at =~ valid_char_re
|
||||||
let escaped = delimitMate#CursorIdx() >= 1 && delimitMate#GetCharFromCursor(-1) == '\'
|
let escaped = delimitMate#CursorIdx() >= 1 && delimitMate#GetCharFromCursor(-1) == '\'
|
||||||
let result = word_before || escaped || word_at
|
let result = word_before || escaped || word_at
|
||||||
return result
|
return result
|
||||||
|
|||||||
Reference in new issue
Block a user