To: vim-dev@vim.org Subject: Patch 6.2.243 (extra) Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.243 (extra) Problem: Mac: Dropping a file on a Vim icon causes a hit-enter prompt. Solution: Move the dropped files to the global argument list, instead of the usual drop handling. (Eckehard Berns) Files: src/main.c, src/gui_mac.c *** ../vim-6.2.242/src/main.c Fri Feb 6 19:35:39 2004 --- src/main.c Sat Feb 7 18:30:04 2004 *************** *** 1535,1540 **** --- 1546,1553 ---- * This seems to be required to make callbacks to be called now, instead * of after things have been put on the screen, which then may be deleted * when getting a resize callback. + * For the Mac this handles putting files dropped on the Vim icon to + * global_alist. */ if (gui.in_use) { *** ../vim-6.2.242/src/gui_mac.c Sun Jan 25 20:45:55 2004 --- src/gui_mac.c Fri Feb 6 20:36:38 2004 *************** *** 1162,1167 **** --- 1162,1186 ---- return (error); } + #ifdef MACOS_X_UNIX + if (starting > 0) + { + int i; + char_u *p; + + /* these are the initial files dropped on the Vim icon */ + for (i = 0 ; i < numFiles; i++) + { + if (ga_grow(&global_alist.al_ga, 1) == FAIL + || (p = vim_strsave(fnames[i])) == NULL) + mch_exit(2); + else + alist_add(&global_alist, p, 2); + } + goto finished; + } + #endif + /* Handle the drop, :edit to get to the file */ handle_drop(numFiles, fnames, FALSE); *************** *** 1188,1193 **** --- 1207,1216 ---- update_screen(NOT_VALID); setcursor(); out_flush(); + + #ifdef MACOS_X_UNIX + finished: + #endif AEDisposeDesc(&theList); /* dispose what we allocated */ *** ../vim-6.2.242/src/version.c Fri Feb 6 19:35:39 2004 --- src/version.c Sun Feb 8 14:37:59 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 243, /**/ -- hundred-and-one symptoms of being an internet addict: 83. Batteries in the TV remote now last for months. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///