diff options
author | jluehrs2 <jluehrs2@uiuc.edu> | 2008-05-07 05:04:07 -0500 |
---|---|---|
committer | jluehrs2 <jluehrs2@uiuc.edu> | 2008-05-07 05:04:07 -0500 |
commit | 52b7d2674f5d387c9318d444ba8dcf24f6f7575e (patch) | |
tree | 83e75145e9ff45e842d42f539c22b60caeba776a /vim/plugin/foldtext.vim | |
parent | dfdbc19ddc951a93c8c24a9eb87b03a8600d00cb (diff) | |
download | vim-foldtext-52b7d2674f5d387c9318d444ba8dcf24f6f7575e.tar.gz vim-foldtext-52b7d2674f5d387c9318d444ba8dcf24f6f7575e.zip |
handle terminal widths other than 80
Diffstat (limited to 'vim/plugin/foldtext.vim')
-rw-r--r-- | vim/plugin/foldtext.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vim/plugin/foldtext.vim b/vim/plugin/foldtext.vim index 728b822..a8f31b7 100644 --- a/vim/plugin/foldtext.vim +++ b/vim/plugin/foldtext.vim @@ -34,8 +34,8 @@ function Foldtext_base(...) let line = substitute(line, '^\s*\(.\{-}\)\s*$', '\1', '') " }}} " align everything, and pad the end of the display with - {{{ - let line = printf('%-' . (62 - v:foldlevel) . 's', line) - let line = strpart(line, 0, 62 - v:foldlevel) + let alignment = &columns - 18 - v:foldlevel + let line = strpart(printf('%-' . alignment . 's', line), 0, alignment) let line = substitute(line, '\%( \)\@<= \%( *$\)\@=', '-', 'g') " }}} " format the line count {{{ |