summaryrefslogtreecommitdiffstats
path: root/src/if_xcmdsrv.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-03-18 18:10:13 +0100
committerBram Moolenaar <Bram@vim.org>2017-03-18 18:10:13 +0100
commit7416f3e73ab2c4e7ae3adc2ff6e70234f7d40d2e (patch)
tree7bc5f55c1b3a71dee7a0fe23ca77f51262bff08e /src/if_xcmdsrv.c
parent15bf76d40be1f1622ff5cc16596c308e76e2ca94 (diff)
patch 8.0.0475: not enough testing for the client-server featurev8.0.0475
Problem: Not enough testing for the client-server feature. Solution: Add more tests. Add the remote_startserver() function. Fix that a locally evaluated expression uses function-local variables.
Diffstat (limited to 'src/if_xcmdsrv.c')
-rw-r--r--src/if_xcmdsrv.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/if_xcmdsrv.c b/src/if_xcmdsrv.c
index fa91c3e8c1..18c208b967 100644
--- a/src/if_xcmdsrv.c
+++ b/src/if_xcmdsrv.c
@@ -399,27 +399,7 @@ serverSendToVim(
/* Execute locally if no display or target is ourselves */
if (dpy == NULL || (serverName != NULL && STRICMP(name, serverName) == 0))
- {
- if (asExpr)
- {
- char_u *ret;
-
- ret = eval_client_expr_to_string(cmd);
- if (result != NULL)
- {
- if (ret == NULL)
- *result = vim_strsave((char_u *)_(e_invexprmsg));
- else
- *result = ret;
- }
- else
- vim_free(ret);
- return ret == NULL ? -1 : 0;
- }
- else
- server_to_input_buf(cmd);
- return 0;
- }
+ return sendToLocalVim(cmd, asExpr, result);
/*
* Bind the server name to a communication window.
@@ -800,6 +780,7 @@ serverSendReply(char_u *name, char_u *str)
WaitForReply(void *p)
{
Window *w = (Window *) p;
+
return ServerReplyFind(*w, SROP_Find) != NULL;
}