mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-13 12:23:48 -05:00
Better handling of tab characters using strdisplaywidth
This commit is contained in:
@@ -67,9 +67,9 @@ let s:shorthand = {
|
||||
\ 'mode_sequence': 'm', 'ignores': 'ig', 'filter': 'f'
|
||||
\ }
|
||||
|
||||
if exists("*strwidth")
|
||||
if exists("*strdisplaywidth")
|
||||
function! s:strwidth(str)
|
||||
return strwidth(a:str) + len(matchstr(a:str, '^\t*')) * (&tabstop - 1)
|
||||
return strdisplaywidth(a:str)
|
||||
endfunction
|
||||
else
|
||||
function! s:strwidth(str)
|
||||
|
||||
Reference in New Issue
Block a user