Fixed. What's the process for moving forward with this patch?

On Saturday, October 6, 2012 11:33:36 AM UTC-7, James McCoy wrote:
> On Sat, Oct 06, 2012 at 10:38:10AM -0700, So8res wrote:
> 
> > diff -r 0769b84adf93 runtime/doc/eval.txt
> 
> > --- a/runtime/doc/eval.txt  Fri Oct 05 21:30:08 2012 +0200
> 
> > +++ b/runtime/doc/eval.txt  Sat Oct 06 10:21:36 2012 -0700
> 
> > @@ -3754,7 +3754,7 @@
> 
> >             Like |input()|, but when the GUI is running and text dialogs
> 
> >             are supported, a dialog window pops up to input the text.
> 
> >             Example: >
> 
> > -                   :let n = inputdialog("value for shiftwidth", &sw)
> 
> > +                   :let n = inputdialog("value for shiftwidth", &sw())
> 
> 
> 
> This should be "shiftwidth()", not "&sw()".
> 
> 
> 
> -- 
> 
> James
> 
> GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <>

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
diff -r 0769b84adf93 runtime/doc/eval.txt
--- a/runtime/doc/eval.txt	Fri Oct 05 21:30:08 2012 +0200
+++ b/runtime/doc/eval.txt	Sat Oct 06 10:21:36 2012 -0700
@@ -3754,7 +3754,7 @@
 		Like |input()|, but when the GUI is running and text dialogs
 		are supported, a dialog window pops up to input the text.
 		Example: >
-			:let n = inputdialog("value for shiftwidth", &sw)
+			:let n = inputdialog("value for shiftwidth", shiftwidth())
 			:if n != ""
 			:  let &sw = n
 			:endif
@@ -5330,6 +5330,9 @@
 		cursor.  Example of use with |system()|: >
 		    :call system("chmod +w -- " . shellescape(expand("%")))
 
+shiftwidth()						*shiftwidth()*
+		Returns the resolved value of 'shiftwidth'. This is the 'sw'
+		value unless it is zero, in which case it is the 'ts' value.
 
 simplify({filename})					*simplify()*
 		Simplify the file name as much as possible without changing
diff -r 0769b84adf93 runtime/doc/options.txt
--- a/runtime/doc/options.txt	Fri Oct 05 21:30:08 2012 +0200
+++ b/runtime/doc/options.txt	Sat Oct 06 10:21:36 2012 -0700
@@ -6119,7 +6119,8 @@
 			local to buffer
 	Number of spaces to use for each step of (auto)indent.  Used for
 	|'cindent'|, |>>|, |<<|, etc.
-	When zero the 'ts' value will be used.
+	When zero the 'ts' value will be used. Use the |shiftwidth()| function
+	to get the resolved value of 'shiftwidth'.
 
 						*'shortmess'* *'shm'*
 'shortmess' 'shm'	string	(Vim default "filnxtToO", Vi default: "",
diff -r 0769b84adf93 src/eval.c
--- a/src/eval.c	Fri Oct 05 21:30:08 2012 +0200
+++ b/src/eval.c	Sat Oct 06 10:21:36 2012 -0700
@@ -687,6 +687,7 @@
 static void f_settabwinvar __ARGS((typval_T *argvars, typval_T *rettv));
 static void f_setwinvar __ARGS((typval_T *argvars, typval_T *rettv));
 static void f_shellescape __ARGS((typval_T *argvars, typval_T *rettv));
+static void f_shiftwidth __ARGS((typval_T *argvars, typval_T *rettv));
 static void f_simplify __ARGS((typval_T *argvars, typval_T *rettv));
 #ifdef FEAT_FLOAT
 static void f_sin __ARGS((typval_T *argvars, typval_T *rettv));
@@ -8051,6 +8052,7 @@
     {"settabwinvar",	4, 4, f_settabwinvar},
     {"setwinvar",	3, 3, f_setwinvar},
     {"shellescape",	1, 2, f_shellescape},
+    {"shiftwidth",	0, 0, f_shiftwidth},
     {"simplify",	1, 1, f_simplify},
 #ifdef FEAT_FLOAT
     {"sin",		1, 1, f_sin},
@@ -16652,6 +16654,16 @@
 }
 
 /*
+ * shiftwidth() function
+ */
+f_shiftwidth(argvars, rettv)
+    typval_T	*argvars;
+    typval_T	*rettv;
+{
+    rettv->vval.v_number = get_sw_value();
+}
+
+/*
  * "simplify()" function
  */
     static void

Raspunde prin e-mail lui