home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.2.243 < prev    next >
Encoding:
Internet Message Format  |  2004-02-07  |  2.5 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.2.243 (extra)
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.2.243 (extra)
  11. Problem:    Mac: Dropping a file on a Vim icon causes a hit-enter prompt.
  12. Solution:   Move the dropped files to the global argument list, instead of the
  13.         usual drop handling. (Eckehard Berns)
  14. Files:        src/main.c, src/gui_mac.c
  15.  
  16.  
  17. *** ../vim-6.2.242/src/main.c    Fri Feb  6 19:35:39 2004
  18. --- src/main.c    Sat Feb  7 18:30:04 2004
  19. ***************
  20. *** 1535,1540 ****
  21. --- 1546,1553 ----
  22.        * This seems to be required to make callbacks to be called now, instead
  23.        * of after things have been put on the screen, which then may be deleted
  24.        * when getting a resize callback.
  25. +      * For the Mac this handles putting files dropped on the Vim icon to
  26. +      * global_alist.
  27.        */
  28.       if (gui.in_use)
  29.       {
  30. *** ../vim-6.2.242/src/gui_mac.c    Sun Jan 25 20:45:55 2004
  31. --- src/gui_mac.c    Fri Feb  6 20:36:38 2004
  32. ***************
  33. *** 1162,1167 ****
  34. --- 1162,1186 ----
  35.         return (error);
  36.       }
  37.   
  38. + #ifdef MACOS_X_UNIX
  39. +     if (starting > 0)
  40. +     {
  41. +     int i;
  42. +     char_u *p;
  43. +     /* these are the initial files dropped on the Vim icon */
  44. +     for (i = 0 ; i < numFiles; i++)
  45. +     {
  46. +         if (ga_grow(&global_alist.al_ga, 1) == FAIL
  47. +                       || (p = vim_strsave(fnames[i])) == NULL)
  48. +         mch_exit(2);
  49. +         else
  50. +         alist_add(&global_alist, p, 2);
  51. +     }
  52. +     goto finished;
  53. +     }
  54. + #endif
  55.       /* Handle the drop, :edit to get to the file */
  56.       handle_drop(numFiles, fnames, FALSE);
  57.   
  58. ***************
  59. *** 1188,1193 ****
  60. --- 1207,1216 ----
  61.       update_screen(NOT_VALID);
  62.       setcursor();
  63.       out_flush();
  64. + #ifdef MACOS_X_UNIX
  65. +   finished:
  66. + #endif
  67.   
  68.       AEDisposeDesc(&theList); /* dispose what we allocated */
  69.   
  70. *** ../vim-6.2.242/src/version.c    Fri Feb  6 19:35:39 2004
  71. --- src/version.c    Sun Feb  8 14:37:59 2004
  72. ***************
  73. *** 639,640 ****
  74. --- 639,642 ----
  75.   {   /* Add new patch number below this line */
  76. + /**/
  77. +     243,
  78.   /**/
  79.  
  80. -- 
  81. hundred-and-one symptoms of being an internet addict:
  82. 83. Batteries in the TV remote now last for months.
  83.  
  84.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  85. ///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  86. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  87.  \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
  88.