Make the 'exceeded max signs' warning less intrusive.

- Only show it once per buffer.
- Redraw before echo to avoid the hit-enter prompt.

See #259.
This commit is contained in:
Andy Stewart
2016-01-13 16:05:18 +00:00
parent f52f875fc7
commit 3a810a9afc
2 changed files with 11 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ function! gitgutter#process_buffer(bufnr, realtime)
let modified_lines = gitgutter#diff#process_hunks(gitgutter#hunk#hunks())
if len(modified_lines) > g:gitgutter_max_signs
call gitgutter#utility#warn('exceeded maximum number of signs (configured by g:gitgutter_max_signs).')
call gitgutter#utility#warn_once('exceeded maximum number of signs (configured by g:gitgutter_max_signs).', 'max_signs')
call gitgutter#sign#clear_signs()
return
endif