0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -04:00

patch 7.4.1662

Problem:    No test for an invalid Ex command on a channel.
Solution:   Test handling an invalid command gracefully.  Avoid getting an
            error message, do write it to the channel log.
This commit is contained in:
Bram Moolenaar
2016-03-26 22:56:46 +01:00
parent fa8b2e173d
commit c4dcd60c76
4 changed files with 21 additions and 0 deletions

View File

@@ -73,6 +73,11 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
print("sending: {0}".format(cmd))
self.request.sendall(cmd.encode('utf-8'))
response = "ok"
elif decoded[1] == 'bad command':
cmd = '["ex","foo bar"]'
print("sending: {0}".format(cmd))
self.request.sendall(cmd.encode('utf-8'))
response = "ok"
elif decoded[1] == 'do normal':
# Send a normal command.
cmd = '["normal","G$s more\u001b"]'