home *** CD-ROM | disk | FTP | other *** search
- To: vim-dev@vim.org
- Subject: Patch 6.1.059
- Fcc: outbox
- From: Bram Moolenaar <Bram@moolenaar.net>
- MIME-Version: 1.0
- Content-Type: text/plain; charset=ISO-8859-1
- Content-Transfer-Encoding: 8bit
- ------------
-
- Patch 6.1.059
- Problem: ":redir > ~/file" doesn't work. (Stephen Rasku)
- Solution: Expand environment variables in the ":redir >" argument.
- Files: src/ex_docmd.c
-
-
- *** ../vim61.058/src/ex_docmd.c Fri May 3 22:11:51 2002
- --- src/ex_docmd.c Wed May 8 19:38:04 2002
- ***************
- *** 6446,6454 ****
- exarg_T *eap;
- {
- char *mode;
- ! #ifdef FEAT_BROWSE
- ! char_u *browseFile = NULL;
- ! #endif
-
- if (STRICMP(eap->arg, "END") == 0)
- close_redir();
- --- 6446,6452 ----
- exarg_T *eap;
- {
- char *mode;
- ! char_u *fname;
-
- if (STRICMP(eap->arg, "END") == 0)
- close_redir();
- ***************
- *** 6468,6490 ****
-
- close_redir();
-
- #ifdef FEAT_BROWSE
- if (cmdmod.browse)
- {
- browseFile = do_browse(TRUE, (char_u *)_("Save Redirection"),
- ! eap->arg, NULL, NULL, BROWSE_FILTER_ALL_FILES, curbuf);
- if (browseFile == NULL)
- return; /* operation cancelled */
- ! eap->arg = browseFile;
- eap->forceit = TRUE; /* since dialog already asked */
- }
- #endif
-
- ! redir_fd = open_exfile(eap->arg, eap->forceit, mode);
- !
- ! #ifdef FEAT_BROWSE
- ! vim_free(browseFile);
- ! #endif
- }
- #ifdef FEAT_EVAL
- else if (*eap->arg == '@')
- --- 6466,6492 ----
-
- close_redir();
-
- + /* Expand environment variables and "~/". */
- + fname = expand_env_save(eap->arg);
- + if (fname == NULL)
- + return;
- #ifdef FEAT_BROWSE
- if (cmdmod.browse)
- {
- + char_u *browseFile;
- +
- browseFile = do_browse(TRUE, (char_u *)_("Save Redirection"),
- ! fname, NULL, NULL, BROWSE_FILTER_ALL_FILES, curbuf);
- if (browseFile == NULL)
- return; /* operation cancelled */
- ! vim_free(fname);
- ! fname = browseFile;
- eap->forceit = TRUE; /* since dialog already asked */
- }
- #endif
-
- ! redir_fd = open_exfile(fname, eap->forceit, mode);
- ! vim_free(fname);
- }
- #ifdef FEAT_EVAL
- else if (*eap->arg == '@')
- *** ../vim61.058/src/version.c Sat May 11 20:33:53 2002
- --- src/version.c Sat May 11 20:44:08 2002
- ***************
- *** 608,609 ****
- --- 608,611 ----
- { /* Add new patch number below this line */
- + /**/
- + 59,
- /**/
-
- --
- At some point in the project somebody will start whining about the need to
- determine the project "requirements". This involves interviewing people who
- don't know what they want but, curiously, know exactly when they need it.
- (Scott Adams - The Dilbert principle)
-
- /// 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 ///
-