Mercurial > vim
view src/po/cleanup.vim @ 33353:b59205d0567e v9.0.1939
patch 9.0.1939: still a problem when processing LSP RPC requests
Commit: https://github.com/vim/vim/commit/b80ae6cec34639abfb1a7080fb633346a81a5770
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Sun Sep 24 23:38:46 2023 +0200
patch 9.0.1939: still a problem when processing LSP RPC requests
Problem: still a problem when processing LSP RPC requests
Solution: When processing async LSP RPC requests, compare sequence
numbers only in response messages
A LSP request message can be sent to the language server either
synchronously (ch_evalexpr) or asynchronously (ch_sendexpr). In both
cases, when looking for response messages by using the sequence number,
LSP requests messages from the language server with the same sequence
number should not be used. Patch 9.0.1927 fixed this issue for
synchronous requests. This PR fixes the issue for asynchronous requests
and adds additional tests.
closes: #13158
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 24 Sep 2023 23:45:08 +0200 |
parents | 1e9e9d89f0ee |
children | 0c60c61e8fed |
line wrap: on
line source
" Vim script to cleanup a .po file: " - Remove line numbers (avoids that diffs are messy). " - Comment-out fuzzy and empty messages. " - Make sure there is a space before the string (required for Solaris). " Requires Vim 6.0 or later (because of multi-line search patterns). " Disable diff mode, because it makes this very slow let s:was_diff = &diff setl nodiff " untranslated message preceded by c-format or comment silent g/^#, c-format\n#/.d silent g/^#\..*\n#/.d " c-format comments have no effect, the check.vim scripts checks it. " But they might still be useful? " silent g/^#, c-format$/d silent g/^#[:~] /d silent g/^#, fuzzy\(, .*\)\=\nmsgid ""\@!/.+1,/^$/-1s/^/#\~ / silent g/^msgstr"/s//msgstr "/ silent g/^msgid"/s//msgid "/ silent g/^msgstr ""\(\n"\)\@!/?^msgid?,.s/^/#\~ / " Comments only useful for the translator silent g/^#\. /d " clean up empty lines silent g/^\n\n\n/.d silent! %s/\n\+\%$// if s:was_diff setl diff endif