To: vim-dev@vim.org Subject: Patch 6.1.028 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.028 Problem: Client-server: When a --remote-expr fails, Vim still exits with status zero. Solution: Exit Vim with a non-zero status to indicate the --remote-expr failed. (Thomas Scott Urban) Files: src/main.c *** ../vim61.027/src/main.c Sun Apr 21 20:28:48 2002 --- src/main.c Tue Apr 23 22:01:40 2002 *************** *** 2543,2548 **** --- 2544,2550 ---- char_u *sname; int ret; int didone = FALSE; + int exiterr = 0; char **newArgV = argv + 1; int newArgC = 1, Argc = *argc; *************** *** 2620,2625 **** --- 2622,2628 ---- { /* Probably out of memory, exit. */ didone = TRUE; + exiterr = 1; break; } Argc = i; *************** *** 2637,2642 **** --- 2640,2646 ---- /* Failed to send, abort. */ mch_errmsg(_("\nSend failed.\n")); didone = TRUE; + exiterr = 1; } else if (!silent) /* Let vim start normally. */ *************** *** 2752,2758 **** if (didone) { display_errors(); /* display any collected messages */ ! exit(0); /* Mission accomplished - get out */ } } /* Return back into main() */ --- 2756,2762 ---- if (didone) { display_errors(); /* display any collected messages */ ! exit(exiterr); /* Mission accomplished - get out */ } } /* Return back into main() */ *** ../vim61.027/src/version.c Tue Apr 23 21:59:06 2002 --- src/version.c Tue Apr 23 22:00:41 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 28, /**/ -- TALL KNIGHT: We shall say Ni! again to you if you do not appease us. ARTHUR: All right! What do you want? TALL KNIGHT: We want ... a shrubbery! "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///