rhysd / vim-grammarous

A powerful grammar checker for Vim using LanguageTool.
1.1k stars 41 forks source link

Discard the result from GrammarousCheck if current buffer changed. #73

Open skywind3000 opened 5 years ago

skywind3000 commented 5 years ago

Reproduce:

  1. run :GrammarousCheck in the current window (say window 1).

  2. jump to another window (window 2), immediately before LanguageTool finish.

  3. stay in window 2, and wait the background job finish.

vim-grammarous was started in window 1, and was expected to display highlights and underlines in window 1, but actually, it always display errors in the current window (window 2).

Is it possible to check the buffer number when background job finished ? and do nothing if the current buffer number is not the previous one where :GrammarousCheck started ??

skywind3000 commented 4 years ago

any update for this ?