|
Karsten Hopp |
03fdc2 |
# KH: patched for runtimeupdate
|
|
Karsten Hopp |
03fdc2 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
03fdc2 |
Subject: patch 7.0.230
|
|
Karsten Hopp |
03fdc2 |
Fcc: outbox
|
|
Karsten Hopp |
03fdc2 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
03fdc2 |
Mime-Version: 1.0
|
|
Karsten Hopp |
03fdc2 |
Content-Type: text/plain; charset=ISO-8859-1
|
|
Karsten Hopp |
03fdc2 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
03fdc2 |
------------
|
|
Karsten Hopp |
03fdc2 |
|
|
Karsten Hopp |
03fdc2 |
Patch 7.0.230
|
|
Karsten Hopp |
03fdc2 |
Problem: After using ":lcd" a script doesn't know how to restore the
|
|
Karsten Hopp |
03fdc2 |
current directory.
|
|
Karsten Hopp |
03fdc2 |
Solution: Add the haslocaldir() function. (Bob Hiestand)
|
|
Karsten Hopp |
03fdc2 |
Files: runtime/doc/usr_41.txt, runtime/doc/eval.txt, src/eval.c
|
|
Karsten Hopp |
03fdc2 |
|
|
Karsten Hopp |
03fdc2 |
|
|
Karsten Hopp |
03fdc2 |
*** ../vim-7.0.229/runtime/doc/usr_41.txt Sun May 7 17:02:39 2006
|
|
Karsten Hopp |
03fdc2 |
--- runtime/doc/usr_41.txt Thu Apr 26 17:06:48 2007
|
|
Karsten Hopp |
03fdc2 |
***************
|
|
Karsten Hopp |
03fdc2 |
*** 1,4 ****
|
|
Karsten Hopp |
03fdc2 |
! *usr_41.txt* For Vim version 7.0. Last change: 2006 Aug 16
|
|
Karsten Hopp |
03fdc2 |
|
|
Karsten Hopp |
03fdc2 |
VIM USER MANUAL - by Bram Moolenaar
|
|
Karsten Hopp |
03fdc2 |
|
|
Karsten Hopp |
03fdc2 |
--- 1,4 ----
|
|
Karsten Hopp |
03fdc2 |
! *usr_41.txt* For Vim version 7.0. Last change: 2007 Apr 26
|
|
Karsten Hopp |
03fdc2 |
|
|
Karsten Hopp |
03fdc2 |
VIM USER MANUAL - by Bram Moolenaar
|
|
Karsten Hopp |
03fdc2 |
|
|
Karsten Hopp |
03fdc2 |
***************
|
|
Karsten Hopp |
03fdc2 |
*** 703,708 ****
|
|
Karsten Hopp |
03fdc2 |
--- 703,709 ----
|
|
Karsten Hopp |
03fdc2 |
isdirectory() check if a directory exists
|
|
Karsten Hopp |
03fdc2 |
getfsize() get the size of a file
|
|
Karsten Hopp |
03fdc2 |
getcwd() get the current working directory
|
|
Karsten Hopp |
03fdc2 |
+ haslocaldir() check if current window used |:lcd|
|
|
Karsten Hopp |
03fdc2 |
tempname() get the name of a temporary file
|
|
Karsten Hopp |
03fdc2 |
mkdir() create a new directory
|
|
Karsten Hopp |
03fdc2 |
delete() delete a file
|
|
Karsten Hopp |
03fdc2 |
*** ../vim-7.0.229/runtime/doc/eval.txt Tue Mar 27 10:20:58 2007
|
|
Karsten Hopp |
03fdc2 |
--- runtime/doc/eval.txt Tue Apr 24 21:50:49 2007
|
|
Karsten Hopp |
03fdc2 |
***************
|
|
Karsten Hopp |
03fdc2 |
*** 1,4 ****
|
|
Karsten Hopp |
03fdc2 |
! *eval.txt* For Vim version 7.0. Last change: 2006 Nov 01
|
|
Karsten Hopp |
03fdc2 |
|
|
Karsten Hopp |
03fdc2 |
|
|
Karsten Hopp |
03fdc2 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
|
Karsten Hopp |
03fdc2 |
--- 1,4 ----
|
|
Karsten Hopp |
03fdc2 |
! *eval.txt* For Vim version 7.0. Last change: 2007 Apr 24
|
|
Karsten Hopp |
03fdc2 |
|
|
Karsten Hopp |
03fdc2 |
|
|
Karsten Hopp |
03fdc2 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
|
Karsten Hopp |
03fdc2 |
***************
|
|
Karsten Hopp |
03fdc2 |
*** 1623,1628 ****
|
|
Karsten Hopp |
03fdc2 |
--- 1633,1639 ----
|
|
Karsten Hopp |
03fdc2 |
globpath( {path}, {expr}) String do glob({expr}) for all dirs in {path}
|
|
Karsten Hopp |
03fdc2 |
has( {feature}) Number TRUE if feature {feature} supported
|
|
Karsten Hopp |
03fdc2 |
has_key( {dict}, {key}) Number TRUE if {dict} has entry {key}
|
|
Karsten Hopp |
03fdc2 |
+ haslocaldir() Number TRUE if current window executed |:lcd|
|
|
Karsten Hopp |
03fdc2 |
hasmapto( {what} [, {mode} [, {abbr}]])
|
|
Karsten Hopp |
03fdc2 |
Number TRUE if mapping to {what} exists
|
|
Karsten Hopp |
03fdc2 |
histadd( {history},{item}) String add an item to a history
|
|
Karsten Hopp |
03fdc2 |
***************
|
|
Karsten Hopp |
03fdc2 |
*** 3016,3021 ****
|
|
Karsten Hopp |
03fdc2 |
--- 3041,3049 ----
|
|
Karsten Hopp |
03fdc2 |
The result is a Number, which is 1 if |Dictionary| {dict} has
|
|
Karsten Hopp |
03fdc2 |
an entry with key {key}. Zero otherwise.
|
|
Karsten Hopp |
03fdc2 |
|
|
Karsten Hopp |
03fdc2 |
+ haslocaldir() *haslocaldir()*
|
|
Karsten Hopp |
03fdc2 |
+ The result is a Number, which is 1 when the current
|
|
Karsten Hopp |
03fdc2 |
+ window has set a local path via |:lcd|, and 0 otherwise.
|
|
Karsten Hopp |
03fdc2 |
|
|
Karsten Hopp |
03fdc2 |
hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()*
|
|
Karsten Hopp |
03fdc2 |
The result is a Number, which is 1 if there is a mapping that
|
|
Karsten Hopp |
03fdc2 |
*** ../vim-7.0.229/src/eval.c Thu Apr 26 10:55:46 2007
|
|
Karsten Hopp |
03fdc2 |
--- src/eval.c Thu Apr 26 10:52:09 2007
|
|
Karsten Hopp |
03fdc2 |
***************
|
|
Karsten Hopp |
03fdc2 |
*** 541,546 ****
|
|
Karsten Hopp |
03fdc2 |
--- 541,547 ----
|
|
Karsten Hopp |
03fdc2 |
static void f_globpath __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
03fdc2 |
static void f_has __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
03fdc2 |
static void f_has_key __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
03fdc2 |
+ static void f_haslocaldir __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
03fdc2 |
static void f_hasmapto __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
03fdc2 |
static void f_histadd __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
03fdc2 |
static void f_histdel __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
03fdc2 |
***************
|
|
Karsten Hopp |
03fdc2 |
*** 7110,7115 ****
|
|
Karsten Hopp |
03fdc2 |
--- 7111,7117 ----
|
|
Karsten Hopp |
03fdc2 |
{"globpath", 2, 2, f_globpath},
|
|
Karsten Hopp |
03fdc2 |
{"has", 1, 1, f_has},
|
|
Karsten Hopp |
03fdc2 |
{"has_key", 2, 2, f_has_key},
|
|
Karsten Hopp |
03fdc2 |
+ {"haslocaldir", 0, 0, f_haslocaldir},
|
|
Karsten Hopp |
03fdc2 |
{"hasmapto", 1, 3, f_hasmapto},
|
|
Karsten Hopp |
03fdc2 |
{"highlightID", 1, 1, f_hlID}, /* obsolete */
|
|
Karsten Hopp |
03fdc2 |
{"highlight_exists",1, 1, f_hlexists}, /* obsolete */
|
|
Karsten Hopp |
03fdc2 |
***************
|
|
Karsten Hopp |
03fdc2 |
*** 11131,11136 ****
|
|
Karsten Hopp |
03fdc2 |
--- 11133,11150 ----
|
|
Karsten Hopp |
03fdc2 |
|
|
Karsten Hopp |
03fdc2 |
rettv->vval.v_number = dict_find(argvars[0].vval.v_dict,
|
|
Karsten Hopp |
03fdc2 |
get_tv_string(&argvars[1]), -1) != NULL;
|
|
Karsten Hopp |
03fdc2 |
+ }
|
|
Karsten Hopp |
03fdc2 |
+
|
|
Karsten Hopp |
03fdc2 |
+ /*
|
|
Karsten Hopp |
03fdc2 |
+ * "haslocaldir()" function
|
|
Karsten Hopp |
03fdc2 |
+ */
|
|
Karsten Hopp |
03fdc2 |
+ /*ARGSUSED*/
|
|
Karsten Hopp |
03fdc2 |
+ static void
|
|
Karsten Hopp |
03fdc2 |
+ f_haslocaldir(argvars, rettv)
|
|
Karsten Hopp |
03fdc2 |
+ typval_T *argvars;
|
|
Karsten Hopp |
03fdc2 |
+ typval_T *rettv;
|
|
Karsten Hopp |
03fdc2 |
+ {
|
|
Karsten Hopp |
03fdc2 |
+ rettv->vval.v_number = (curwin->w_localdir != NULL);
|
|
Karsten Hopp |
03fdc2 |
}
|
|
Karsten Hopp |
03fdc2 |
|
|
Karsten Hopp |
03fdc2 |
/*
|
|
Karsten Hopp |
03fdc2 |
*** ../vim-7.0.229/src/version.c Thu Apr 26 16:50:05 2007
|
|
Karsten Hopp |
03fdc2 |
--- src/version.c Thu Apr 26 17:04:15 2007
|
|
Karsten Hopp |
03fdc2 |
***************
|
|
Karsten Hopp |
03fdc2 |
*** 668,669 ****
|
|
Karsten Hopp |
03fdc2 |
--- 668,671 ----
|
|
Karsten Hopp |
03fdc2 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
03fdc2 |
+ /**/
|
|
Karsten Hopp |
03fdc2 |
+ 230,
|
|
Karsten Hopp |
03fdc2 |
/**/
|
|
Karsten Hopp |
03fdc2 |
|
|
Karsten Hopp |
03fdc2 |
--
|
|
Karsten Hopp |
03fdc2 |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
03fdc2 |
22. You've already visited all the links at Yahoo and you're halfway through
|
|
Karsten Hopp |
03fdc2 |
Lycos.
|
|
Karsten Hopp |
03fdc2 |
|
|
Karsten Hopp |
03fdc2 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
03fdc2 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
03fdc2 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
03fdc2 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|