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.1.059 < prev    next >
Encoding:
Internet Message Format  |  2002-05-10  |  2.9 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.059
  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.1.059
  11. Problem:    ":redir > ~/file" doesn't work. (Stephen Rasku)
  12. Solution:   Expand environment variables in the ":redir >" argument.
  13. Files:        src/ex_docmd.c
  14.  
  15.  
  16. *** ../vim61.058/src/ex_docmd.c    Fri May  3 22:11:51 2002
  17. --- src/ex_docmd.c    Wed May  8 19:38:04 2002
  18. ***************
  19. *** 6446,6454 ****
  20.       exarg_T    *eap;
  21.   {
  22.       char    *mode;
  23. ! #ifdef FEAT_BROWSE
  24. !     char_u    *browseFile = NULL;
  25. ! #endif
  26.   
  27.       if (STRICMP(eap->arg, "END") == 0)
  28.       close_redir();
  29. --- 6446,6452 ----
  30.       exarg_T    *eap;
  31.   {
  32.       char    *mode;
  33. !     char_u    *fname;
  34.   
  35.       if (STRICMP(eap->arg, "END") == 0)
  36.       close_redir();
  37. ***************
  38. *** 6468,6490 ****
  39.   
  40.           close_redir();
  41.   
  42.   #ifdef FEAT_BROWSE
  43.           if (cmdmod.browse)
  44.           {
  45.           browseFile = do_browse(TRUE, (char_u *)_("Save Redirection"),
  46. !                eap->arg, NULL, NULL, BROWSE_FILTER_ALL_FILES, curbuf);
  47.           if (browseFile == NULL)
  48.               return;        /* operation cancelled */
  49. !         eap->arg = browseFile;
  50.           eap->forceit = TRUE;    /* since dialog already asked */
  51.           }
  52.   #endif
  53.   
  54. !         redir_fd = open_exfile(eap->arg, eap->forceit, mode);
  55. ! #ifdef FEAT_BROWSE
  56. !         vim_free(browseFile);
  57. ! #endif
  58.       }
  59.   #ifdef FEAT_EVAL
  60.       else if (*eap->arg == '@')
  61. --- 6466,6492 ----
  62.   
  63.           close_redir();
  64.   
  65. +         /* Expand environment variables and "~/". */
  66. +         fname = expand_env_save(eap->arg);
  67. +         if (fname == NULL)
  68. +         return;
  69.   #ifdef FEAT_BROWSE
  70.           if (cmdmod.browse)
  71.           {
  72. +         char_u    *browseFile;
  73.           browseFile = do_browse(TRUE, (char_u *)_("Save Redirection"),
  74. !                fname, NULL, NULL, BROWSE_FILTER_ALL_FILES, curbuf);
  75.           if (browseFile == NULL)
  76.               return;        /* operation cancelled */
  77. !         vim_free(fname);
  78. !         fname = browseFile;
  79.           eap->forceit = TRUE;    /* since dialog already asked */
  80.           }
  81.   #endif
  82.   
  83. !         redir_fd = open_exfile(fname, eap->forceit, mode);
  84. !         vim_free(fname);
  85.       }
  86.   #ifdef FEAT_EVAL
  87.       else if (*eap->arg == '@')
  88. *** ../vim61.058/src/version.c    Sat May 11 20:33:53 2002
  89. --- src/version.c    Sat May 11 20:44:08 2002
  90. ***************
  91. *** 608,609 ****
  92. --- 608,611 ----
  93.   {   /* Add new patch number below this line */
  94. + /**/
  95. +     59,
  96.   /**/
  97.  
  98. -- 
  99. At some point in the project somebody will start whining about the need to
  100. determine the project "requirements".  This involves interviewing people who
  101. don't know what they want but, curiously, know exactly when they need it.
  102.                 (Scott Adams - The Dilbert principle)
  103.  
  104.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  105. ///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
  106. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  107.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  108.