mirror of
https://github.com/tpope/vim-fugitive.git
synced 2026-10-12 08:00:18 +08:00
Include foldcolumn in diff width calculation
This commit is contained in:
1 parent
c5a3c5f8ce
commit
aed0043a1f
1 file changed
+2
-1
+2
-1
@@ -1412,7 +1412,8 @@ function! s:diff_horizontal() abort
|
|||||||
elseif &diffopt =~# 'vertical'
|
elseif &diffopt =~# 'vertical'
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
return winwidth(0) <= 2 * (&tw ? &tw : 80)
|
let fdc = matchstr(&diffopt, 'foldcolumn:\zs\d\+')
|
||||||
|
return winwidth(0) <= 2 * ((&tw ? &tw : 80) + (empty(fdc) ? 2 : fdc))
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user