diff src/os_mswin.c @ 11177:76fb679a310e v8.0.0475

patch 8.0.0475: not enough testing for the client-server feature commit https://github.com/vim/vim/commit/7416f3e73ab2c4e7ae3adc2ff6e70234f7d40d2e Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 18 18:10:13 2017 +0100 patch 8.0.0475: not enough testing for the client-server feature 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.
author Christian Brabandt <cb@256bit.org>
date Sat, 18 Mar 2017 18:15:04 +0100
parents 9836b701afd9
children 13544aa85dc0
line wrap: on
line diff
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -2409,6 +2409,10 @@ serverSendToVim(
     int		retcode = 0;
     char_u	altname_buf[MAX_PATH];
 
+    /* Execute locally if no display or target is ourselves */
+    if (serverName != NULL && STRICMP(name, serverName) == 0)
+	return sendToLocalVim(cmd, asExpr, result);
+
     /* If the server name does not end in a digit then we look for an
      * alternate name.  e.g. when "name" is GVIM the we may find GVIM2. */
     if (STRLEN(name) > 1 && !vim_isdigit(name[STRLEN(name) - 1]))