0
0
mirror of https://github.com/vim/vim.git synced 2025-10-02 05:04:20 -04:00

patch 8.0.0312: failure when a channel receives a split json message

Problem:    When a json message arrives in pieces, the start is dropped and
            the decoding fails.
Solution:   Do not drop the start when it is still needed. (Kay Zheng)  Add a
            test.  Reset the timeout when something is received.
This commit is contained in:
Bram Moolenaar
2017-02-06 21:56:09 +01:00
parent 544d3bc9f0
commit 88989cc381
5 changed files with 50 additions and 23 deletions

View File

@@ -29,6 +29,11 @@ if __name__ == "__main__":
if typed.startswith("echo "):
print(typed[5:-1])
sys.stdout.flush()
if typed.startswith("echosplit "):
for part in typed[10:-1].split('|'):
sys.stdout.write(part)
sys.stdout.flush()
time.sleep(0.05)
if typed.startswith("double "):
print(typed[7:-1] + "\nAND " + typed[7:-1])
sys.stdout.flush()