diff options
Diffstat (limited to 'src/if_xcmdsrv.c')
-rw-r--r-- | src/if_xcmdsrv.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/src/if_xcmdsrv.c b/src/if_xcmdsrv.c index 1f6b8d212f..1aa09fd4a3 100644 --- a/src/if_xcmdsrv.c +++ b/src/if_xcmdsrv.c @@ -388,11 +388,12 @@ serverSendToVim( if (name == NULL || *name == NUL) name = (char_u *)"GVIM"; // use a default name - if (commProperty == None && dpy != NULL) - { - if (SendInit(dpy) < 0) - return -1; - } + if (commProperty == None && dpy != NULL && SendInit(dpy) < 0) + return -1; + +#if defined(FEAT_EVAL) + ch_log(NULL, "serverSendToVim(%s, %s)", name, cmd); +#endif // Execute locally if no display or target is ourselves if (dpy == NULL || (serverName != NULL && STRICMP(name, serverName) == 0)) @@ -494,6 +495,11 @@ serverSendToVim( break; } } + +#if defined(FEAT_EVAL) + ch_log(NULL, "serverSendToVim() result: %s", + pending.result == NULL ? "NULL" : (char *)pending.result); +#endif if (result != NULL) *result = pending.result; else @@ -1221,6 +1227,10 @@ server_parse_message( int code; char_u *tofree; +#if defined(FEAT_EVAL) + ch_log(NULL, "server_parse_message() numItems: %ld", numItems); +#endif + /* * Several commands and results could arrive in the property at * one time; each iteration through the outer loop handles a @@ -1240,7 +1250,7 @@ server_parse_message( continue; } - if ((*p == 'c' || *p == 'k') && (p[1] == 0)) + if ((*p == 'c' || *p == 'k') && p[1] == 0) { Window resWindow; char_u *name, *script, *serial, *end; @@ -1261,6 +1271,9 @@ server_parse_message( enc = NULL; while ((long_u)(p - propInfo) < numItems && *p == '-') { +#if defined(FEAT_EVAL) + ch_log(NULL, "server_parse_message() item: %c, %s", p[-2], p); +#endif switch (p[1]) { case 'r': @@ -1326,7 +1339,8 @@ server_parse_message( ga_concat(&reply, res); else { - ga_concat(&reply, (char_u *)_(e_invalid_expression_received)); + ga_concat(&reply, + (char_u *)_(e_invalid_expression_received)); ga_append(&reply, 0); ga_concat(&reply, (char_u *)"-c 1"); } |