mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
Enable turning off limit on maximum number of signs
Setting the variable to a known value (-1) is neater than an arbitrary high number. See #681.
This commit is contained in:
@@ -143,6 +143,8 @@ To keep your Vim snappy, vim-gitgutter will suppress the signs when a file has m
|
|||||||
let g:gitgutter_max_signs = 500 " default value
|
let g:gitgutter_max_signs = 500 " default value
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can also remove the limit by setting `g:gitgutter_max_signs = -1`.
|
||||||
|
|
||||||
#### Hunks
|
#### Hunks
|
||||||
|
|
||||||
You can jump between hunks:
|
You can jump between hunks:
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ function! gitgutter#diff#handler(bufnr, diff) abort
|
|||||||
let modified_lines = gitgutter#diff#process_hunks(a:bufnr, gitgutter#hunk#hunks(a:bufnr))
|
let modified_lines = gitgutter#diff#process_hunks(a:bufnr, gitgutter#hunk#hunks(a:bufnr))
|
||||||
|
|
||||||
let signs_count = len(modified_lines)
|
let signs_count = len(modified_lines)
|
||||||
if signs_count > g:gitgutter_max_signs
|
if g:gitgutter_max_signs != -1 && signs_count > g:gitgutter_max_signs
|
||||||
call gitgutter#utility#warn_once(a:bufnr, printf(
|
call gitgutter#utility#warn_once(a:bufnr, printf(
|
||||||
\ 'exceeded maximum number of signs (%d > %d, configured by g:gitgutter_max_signs).',
|
\ 'exceeded maximum number of signs (%d > %d, configured by g:gitgutter_max_signs).',
|
||||||
\ signs_count, g:gitgutter_max_signs), 'max_signs')
|
\ signs_count, g:gitgutter_max_signs), 'max_signs')
|
||||||
|
|||||||
@@ -419,6 +419,8 @@ 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
|
the number of changed lines exceeds this value, the plugin removes all signs
|
||||||
and displays a warning message.
|
and displays a warning message.
|
||||||
|
|
||||||
|
Set to -1 to remove the limit.
|
||||||
|
|
||||||
*g:gitgutter_sign_priority*
|
*g:gitgutter_sign_priority*
|
||||||
Default: 10
|
Default: 10
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user