To: vim-dev@vim.org Subject: Patch 6.1.451 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.451 Problem: GUI: When text in the find dialog contains a slash, a backslash is inserted the next time it is opened. (Mezz) Solution: Remove escaped backslashes and question marks. (Daniel Elstner) Files: src/gui.c *** ../vim61.450/src/gui.c Sun Mar 23 20:55:21 2003 --- src/gui.c Sun Apr 6 21:47:48 2003 *************** *** 4173,4178 **** --- 4178,4184 ---- if (text != NULL) { int len = STRLEN(text); + int i; /* Remove "\V" */ if (len >= 2 && STRNCMP(text, "\\V", 2) == 0) *************** *** 4199,4204 **** --- 4205,4218 ---- text[len - 4] = NUL; } + /* Recognize "\/" or "\?" and remove. */ + for (i = 0; i + 1 < len; ++i) + if (text[i] == '\\' && (text[i + 1] == '/' + || text[i + 1] == '?')) + { + mch_memmove(text + i, text + i + 1, (size_t)(len - i)); + --len; + } } } return text; *** ../vim61.450/src/version.c Sun Apr 6 22:16:28 2003 --- src/version.c Sun Apr 6 22:23:51 2003 *************** *** 613,614 **** --- 613,616 ---- { /* Add new patch number below this line */ + /**/ + 451, /**/ -- ARTHUR: Charge! [They all charge with swords drawn towards the RABBIT. A tremendous twenty second fight with Peckinpahish shots and borrowing heavily also on the Kung Fu and karate-type films ensues, in which some four KNIGHTS are comprehensively killed.] ARTHUR: Run away! Run away! "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///