diff --git a/README.mkd b/README.mkd index 11e6a65..19bc556 100644 --- a/README.mkd +++ b/README.mkd @@ -137,10 +137,11 @@ The same caveat applies to line number highlighting as to line highlighting just If you switch off both line highlighting and signs, you won't see the sign column. -To keep your Vim snappy, vim-gitgutter will suppress the signs when a file has more than 500 changes. As soon as the number of changes falls below the limit vim-gitgutter will show the signs again. You can configure the threshold with: +In older Vims (pre 8.1.0614 / Neovim 0.4.0) vim-gitgutter will suppress the signs when a file has more than 500 changes, to avoid slowing down the UI. As soon as the number of changes falls below the limit vim-gitgutter will show the signs again. You can configure the threshold with: ```viml -let g:gitgutter_max_signs = 500 " default value +let g:gitgutter_max_signs = 500 " default value (Vim < 8.1.0614, Neovim < 0.4.0) +let g:gitgutter_max_signs = -1 " default value (otherwise) ``` You can also remove the limit by setting `g:gitgutter_max_signs = -1`. diff --git a/doc/gitgutter.txt b/doc/gitgutter.txt index b8a1c8b..01e1365 100644 --- a/doc/gitgutter.txt +++ b/doc/gitgutter.txt @@ -412,14 +412,15 @@ Default: 0 Determines whether or not to show line number highlights. *g:gitgutter_max_signs* -Default: 500 +Default: 500 (Vim < 8.1.0614, Neovim < 0.4.0) + -1 (otherwise) Sets the maximum number of signs to show in a buffer. Vim is slow at updating signs, so to avoid slowing down the GUI the number of signs is capped. When the number of changed lines exceeds this value, the plugin removes all signs and displays a warning message. -Set to -1 to remove the limit. +When set to -1 the limit is not applied. *g:gitgutter_sign_priority* Default: 10 diff --git a/plugin/gitgutter.vim b/plugin/gitgutter.vim index 1e3cf23..33f0b07 100644 --- a/plugin/gitgutter.vim +++ b/plugin/gitgutter.vim @@ -29,7 +29,11 @@ else call s:set('g:gitgutter_preview_win_floating', 0) endif call s:set('g:gitgutter_enabled', 1) -call s:set('g:gitgutter_max_signs', 500) +if exists('*sign_unplace') + call s:set('g:gitgutter_max_signs', -1) +else + call s:set('g:gitgutter_max_signs', 500) +endif call s:set('g:gitgutter_signs', 1) call s:set('g:gitgutter_highlight_lines', 0) call s:set('g:gitgutter_highlight_linenrs', 0)