54a4ecf2d9
[READY] Improve diagnostic matches display There are two issues with how we display diagnostic matches. The first issue is that if the current buffer contains diagnostic matches and is split in a new window, all the matches are cleared and only matches in the new window are shown. The second issue is that if a new buffer with no diagnostic support is open in the current window and that window already contained matches then the matches are still displayed. Here's an illustration of both issues (signs are disabled): ![diagnostic-matches-issue](https://user-images.githubusercontent.com/10026824/36352338-bfeb2092-14b7-11e8-88f4-ae8cf6903304.gif) The solution is to add an autocommand that updates matches on the `BufEnter` and `WinEnter` events. Here's the result: ![diagnostic-matches-fix](https://user-images.githubusercontent.com/10026824/36352340-c2a64a8c-14b7-11e8-8db2-4f1f54448c65.gif) Note that it's not perfect as multiple windows of the same buffer won't be updated simultaneously. Supporting that scenario is rather tricky because we would need to go through all the windows to update the matches and switching windows can lead to a lot of issues (like interrupting visual mode) so we don't. This PR also improves how we update matches by only displaying matches that are not already present and then clearing the remaining ones (similarly to what we do with signs; see PR https://github.com/Valloric/YouCompleteMe/pull/2915) instead of always clearing all the matches then displaying the new ones. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/2922) <!-- Reviewable:end --> |
||
---|---|---|
.. | ||
client | ||
tests | ||
__init__.py | ||
base.py | ||
buffer.py | ||
diagnostic_filter.py | ||
diagnostic_interface.py | ||
omni_completer.py | ||
paths.py | ||
setup.py | ||
syntax_parse.py | ||
unsafe_thread_pool_executor.py | ||
vimsupport.py | ||
youcompleteme.py |