commit aed0043a1fdb0692927794ca7a93b2a55d2c526f (tree) parent c5a3c5f8ce539a23e4ad14a6cdd9461ade79b748 Author: Tim Pope <code@tpope.net> Date: Sat, 21 Jun 2014 08:25:02 -0400 Include foldcolumn in diff width calculation Diffstat:
| M | plugin/fugitive.vim | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim @@ -1412,7 +1412,8 @@ function! s:diff_horizontal() abort elseif &diffopt =~# 'vertical' return 0 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 endfunction