mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-18 01:38:57 +00:00
Merge pull request #94 from cocopon/fix-indent-with-tab
Fix tab indent for popup
This commit is contained in:
@@ -597,7 +597,14 @@ function! s:do_offscreen_popup(offscreen) " {{{1
|
||||
if &number || &relativenumber
|
||||
let l:text = printf('%*S ', wincol()-virtcol('.')-1, l:lnum)
|
||||
endif
|
||||
let l:text .= getline(l:lnum) . ' '
|
||||
|
||||
" replace tab indent with spaces
|
||||
" (popup window doesn't follow tabstop option of current buffer)
|
||||
let l:linestr = getline(l:lnum)
|
||||
let l:indent = repeat(' ', strdisplaywidth(matchstr(l:linestr, '^\s\+')))
|
||||
let l:linestr = substitute(l:linestr, '^\s\+', l:indent, '')
|
||||
|
||||
let l:text .= l:linestr . ' '
|
||||
if l:adjust
|
||||
let l:text .= '… ' . a:offscreen.match . ' '
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user