Re: Patch 7.4.2118

2016-07-29 Fir de Conversatie Kent Sibilev
On Friday, July 29, 2016 at 3:01:36 PM UTC-4, Bram Moolenaar wrote:
> Patch 7.4.2118
> Problem:Mac: can't build with tiny features.
> Solution:   Don't define FEAT_CLIPBOARD unconditionally. (Kazunobu Kuriyama)
> Files:  src/vim.h

After this patch the FEAT_CLIPBOARD is not enabled when building with huge 
feature set. The issue is that this condition

 # if defined(FEAT_SMALL) && !defined(FEAT_CLIPBOARD) 
 #  define FEAT_CLIPBOARD 
 # endif 

is evaluated before the following #include

#include "feature.h"

which actually defines FEAT_SMALL.

It looks like that the following patch fixes it:

diff --git a/src/vim.h b/src/vim.h
index b785527..157be28 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -84,6 +84,8 @@
 # define ROOT_UID 0
 #endif

+#include "feature.h" /* #defines for optionals and features */
+
 /*
  * MACOS_CLASSIC compiling for MacOS prior to MacOS X
  * MACOS_X_UNIX  compiling for MacOS X (using os_unix.c)
@@ -180,8 +182,6 @@
 #endif


-#include "feature.h"   /* #defines for optionals and features */
-
 /* +x11 is only enabled when it's both available and wanted. */
 #if defined(HAVE_X11) && defined(WANT_X11)
 # define FEAT_X11


Regards,
Kent.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[patch] found memory leak in do_ecmd()

2016-07-29 Fir de Conversatie h_east
Hi Bram and list,

I found memory leak in do_ecmd().

If u_savecommon() is FAIL, then `new_name` does not freed.
I wrote a patch.
Check it please.

--
Best regards,
Hirohito Higashi (a.k.a. h_east)

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 860d3dc..e40e435 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -4091,7 +4091,10 @@ do_ecmd(
 	u_sync(FALSE);
 	if (u_savecommon(0, curbuf->b_ml.ml_line_count + 1, 0, TRUE)
  == FAIL)
+	{
+		vim_free(new_name);
 		goto theend;
+	}
 	u_unchanged(curbuf);
 	buf_freeall(curbuf, BFA_KEEP_UNDO);
 


Re: Patch 7.4.2119

2016-07-29 Fir de Conversatie Ken Takata
Hi,

2016/7/30 Sat 6:06:13 UTC+9 Bram Moolenaar wrote:
> Ken Takata wrote:
> 
> > 2016/7/30 Sat 5:15:38 UTC+9 Bram Moolenaar wrote:
> > > Patch 7.4.2119
> > > Problem:Closures are not supported.
> > > Solution:   Capture variables in lambdas from the outer scope. (Yasuhiro
> > > Matsumoto, Ken Takata)
> > > Files:  runtime/doc/eval.txt, src/eval.c, src/ex_cmds2.c, 
> > > src/globals.h,
> > > src/proto/eval.pro, src/proto/userfunc.pro,
> > > src/testdir/test_lambda.vim, src/userfunc.c
> > 
> > The following comment in get_lambda_tv() is old:
> > 
> > > + /* Set up dictionaries for checking local variables and arguments. 
> > > */
> > > + if (evaluate)
> > > + eval_lavars_used = _lavars;
> > 
> > It was a comment for the capture-by-value patch.
> 
> So, just delete it?

Just delete or: 

/* Set up a flag for checking local variables and arguments. */

Regards,
Ken Takata

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.2119

2016-07-29 Fir de Conversatie Bram Moolenaar

Ken Takata wrote:

> 2016/7/30 Sat 5:15:38 UTC+9 Bram Moolenaar wrote:
> > Patch 7.4.2119
> > Problem:Closures are not supported.
> > Solution:   Capture variables in lambdas from the outer scope. (Yasuhiro
> > Matsumoto, Ken Takata)
> > Files:  runtime/doc/eval.txt, src/eval.c, src/ex_cmds2.c, src/globals.h,
> > src/proto/eval.pro, src/proto/userfunc.pro,
> > src/testdir/test_lambda.vim, src/userfunc.c
> 
> The following comment in get_lambda_tv() is old:
> 
> > + /* Set up dictionaries for checking local variables and arguments. */
> > + if (evaluate)
> > +   eval_lavars_used = _lavars;
> 
> It was a comment for the capture-by-value patch.

So, just delete it?

-- 
What do you get when you cross a joke with a rehtorical question?

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.2119

2016-07-29 Fir de Conversatie Ken Takata
Hi,

2016/7/30 Sat 5:15:38 UTC+9 Bram Moolenaar wrote:
> Patch 7.4.2119
> Problem:Closures are not supported.
> Solution:   Capture variables in lambdas from the outer scope. (Yasuhiro
> Matsumoto, Ken Takata)
> Files:  runtime/doc/eval.txt, src/eval.c, src/ex_cmds2.c, src/globals.h,
> src/proto/eval.pro, src/proto/userfunc.pro,
> src/testdir/test_lambda.vim, src/userfunc.c

The following comment in get_lambda_tv() is old:

> + /* Set up dictionaries for checking local variables and arguments. */
> + if (evaluate)
> + eval_lavars_used = _lavars;

It was a comment for the capture-by-value patch.

Regards,
Ken Takata

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Patch 7.4.2121

2016-07-29 Fir de Conversatie Bram Moolenaar

Patch 7.4.2121
Problem:No easy way to check if lambda and closure are supported.
Solution:   Add the +lambda feature.
Files:  src/evalfunc.c, src/version.c, src/testdir/test_lambda.vim


*** ../vim-7.4.2120/src/evalfunc.c  2016-07-28 22:53:33.161059376 +0200
--- src/evalfunc.c  2016-07-29 22:44:01.555601538 +0200
***
*** 5205,5210 
--- 5205,5211 
  #ifdef FEAT_KEYMAP
"keymap",
  #endif
+   "lambda", /* always with FEAT_EVAL, since 7.4.2120 with closure */
  #ifdef FEAT_LANGMAP
"langmap",
  #endif
*** ../vim-7.4.2120/src/version.c   2016-07-29 22:36:40.211701392 +0200
--- src/version.c   2016-07-29 22:49:37.904473686 +0200
***
*** 304,309 
--- 304,314 
  #else
"-keymap",
  #endif
+ #ifdef FEAT_EVAL
+   "+lambda",
+ #else
+   "-lambda",
+ #endif
  #ifdef FEAT_LANGMAP
"+langmap",
  #else
*** ../vim-7.4.2120/src/testdir/test_lambda.vim 2016-07-29 22:36:40.207701429 
+0200
--- src/testdir/test_lambda.vim 2016-07-29 22:49:03.976789265 +0200
***
*** 1,5 
--- 1,9 
  " Test for lambda and closure
  
+ function! Test_lambda_feature()
+   call assert_equal(1, has('lambda'))
+ endfunction
+ 
  function! Test_lambda_with_filter()
let s:x = 2
call assert_equal([2, 3], filter([1, 2, 3], {i, v -> v >= s:x}))
*** ../vim-7.4.2120/src/version.c   2016-07-29 22:36:40.211701392 +0200
--- src/version.c   2016-07-29 22:49:37.904473686 +0200
***
*** 760,761 
--- 765,768 
  {   /* Add new patch number below this line */
+ /**/
+ 2121,
  /**/

-- 
A programmer's wife asks him: "Please run to the store and pick up a loaf of
bread.  If they have eggs, get a dozen".  The programmer comes home with 12
loafs of bread.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Patch 7.4.2120

2016-07-29 Fir de Conversatie Bram Moolenaar

Patch 7.4.2120
Problem:User defined functions can't be a closure.
Solution:   Add the "closure" argument. Allow using :unlet on a bound
variable. (Yasuhiro Matsumoto, Ken Takata)
Files:  runtime/doc/eval.txt, src/testdir/test_lambda.vim, src/userfunc.c,
src/eval.c src/proto/userfunc.pro


*** ../vim-7.4.2119/runtime/doc/eval.txt2016-07-29 22:14:39.031998331 
+0200
--- runtime/doc/eval.txt2016-07-29 22:25:24.133969732 +0200
***
*** 1231,1236 
--- 1240,1246 
:let Bar = Foo(4)
:echo Bar(6)
  < 5
+ See also |:func-closure|.
  
  Examples for using a lambda expression with |sort()|, |map()| and |filter()|: 
>
:echo map([1, 2, 3], {idx, val -> val + 1})
***
*** 8086,8096 
  See |:verbose-cmd| for more information.
  
*E124* *E125* *E853* *E884*
! :fu[nction][!] {name}([arguments]) [range] [abort] [dict]
Define a new function by the name {name}.  The name
must be made of alphanumeric characters and '_', and
must start with a capital or "s:" (see above).  Note
!   that using "b:" or "g:" is not allowed.
  
{name} can also be a |Dictionary| entry that is a
|Funcref|: >
--- 8218,8231 
  See |:verbose-cmd| for more information.
  
*E124* *E125* *E853* *E884*
! :fu[nction][!] {name}([arguments]) [range] [abort] [dict] [closure]
Define a new function by the name {name}.  The name
must be made of alphanumeric characters and '_', and
must start with a capital or "s:" (see above).  Note
!   that using "b:" or "g:" is not allowed. (since patch
!   7.4.260 E884 is given if the function name has a colon
!   in the name, e.g. for "foo:bar()".  Before that patch
!   no error was given).
  
{name} can also be a |Dictionary| entry that is a
|Funcref|: >
***
*** 8109,8115 
  
For the {arguments} see |function-argument|.
  
!   *a:firstline* *a:lastline*
When the [range] argument is added, the function is
expected to take care of a range itself.  The range is
passed as "a:firstline" and "a:lastline".  If [range]
--- 8244,8250 
  
For the {arguments} see |function-argument|.
  
!   *:func-range* *a:firstline* *a:lastline*
When the [range] argument is added, the function is
expected to take care of a range itself.  The range is
passed as "a:firstline" and "a:lastline".  If [range]
***
*** 8118,8131 
of each line.  See |function-range-example|.
The cursor is still moved to the first line of the
range, as is the case with all Ex commands.
! 
When the [abort] argument is added, the function will
abort as soon as an error is detected.
! 
When the [dict] argument is added, the function must
be invoked through an entry in a |Dictionary|.  The
local variable "self" will then be set to the
dictionary.  See |Dictionary-function|.
  
*function-search-undo*
The last used search pattern and the redo command "."
--- 8253,8288 
of each line.  See |function-range-example|.
The cursor is still moved to the first line of the
range, as is the case with all Ex commands.
!   *:func-abort*
When the [abort] argument is added, the function will
abort as soon as an error is detected.
!   *:func-dict*
When the [dict] argument is added, the function must
be invoked through an entry in a |Dictionary|.  The
local variable "self" will then be set to the
dictionary.  See |Dictionary-function|.
+   *:func-closure* *E932*
+   When the [closure] argument is added, the function
+   can access variables and arguments from the outer
+   scope.  This is usually called a closure.  In this
+  

Re: Wish list for a more powerful search in Vim

2016-07-29 Fir de Conversatie Yegappan Lakshmanan
Hi Christian,

On Fri, Jul 29, 2016 at 11:03 AM, Christian Brabandt  wrote:
>>
>> On Thu, Jul 28, 2016 at 11:16 PM, Christian Brabandt  
>> wrote:
>> > On Do, 28 Jul 2016, Bram Moolenaar wrote:
>> >
>> >> I think it should.  Most users will have 'wrapscan' on, since it is the
>> >> default.  If someone switches it off he must have a reason for it.
>> >
>> > okay, fixed with the latest version
>> >
>>
>> I tested the latest patch and the confirmed that the problems I reported 
>> earlier
>> are fixed. I saw some new issues. Take the following text:
>>
>>   1
>>   2 these
>>   3 the
>>   4 their
>>   5 there
>>   6 their
>>   7 the
>>   8 them
>>   9 these
>>
>> The cursor is in line 1 and I have 'nowrapscan' set. I search for "the" and
>> press CTRL-N 7 times and "the" in "these" is highlighted. Now I press
>> CTRL-L to copy "s" and then erase it. Now if I press CTRL-P, I expect
>> that the cursor will move to line 8. Instead the cursor moves to line 7.
>>
>> Another problem: Place the cursor in line 1. Enter "/thes" and then press
>> CTRL-N. The "thes" in line 9 is highlighted. Now if you press backspace,
>> the cursor jumps back to line 3. I expected that the cursor will remain
>> in line 9.
>
> Thanks, will look at these and add some tests.
>
>> I think, the CTRL-N and CTRL-P should respect the search direction.
>> For example, if I search a pattern using "?text", pressing CTRL-N
>> should search backwards. Currently CTRL-N always searches
>> forward (irrespective of the search direction). Note that this is
>> different from how "n" and "N" work.
>
> Please don't make me do this. Currently the inconsistent search
> direction is one of my biggest annoyances of Vim. I really really really
> hate it, that I can't rely on the fact that N searches backwards and n
> forward.
>

I don't have any preference between the two options. I was just pointing
out the deviation from the behavior of 'n' and 'N' commands.

Regards,
Yegappan

>
> (I even made a patch, to make this configurable
> https://github.com/chrisbra/vim-mq-patches/blob/master/cpo-N
> and this is one of the reasons, I made gn always search forward).
>
>> A typo: The help text in cmdline.txt for CTRL-P refers to CTRL-N.
>>
>>the current match is displayed then CTRL-N will move
>>to the previous match
>
> Will fix, thanks.
>

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Wish list for a more powerful search in Vim

2016-07-29 Fir de Conversatie Charles E Campbell
Christian Brabandt wrote:
> Hi Yegappan!
>
> On Fr, 29 Jul 2016, Yegappan Lakshmanan wrote:
>
>> Hi Christian,
>>
>> On Thu, Jul 28, 2016 at 11:16 PM, Christian Brabandt  
>> wrote:
>>> On Do, 28 Jul 2016, Bram Moolenaar wrote:
>>>
 I think it should.  Most users will have 'wrapscan' on, since it is the
 default.  If someone switches it off he must have a reason for it.
>>> okay, fixed with the latest version
>>>
>> I tested the latest patch and the confirmed that the problems I reported 
>> earlier
>> are fixed. I saw some new issues. Take the following text:
>>
>>   1
>>   2 these
>>   3 the
>>   4 their
>>   5 there
>>   6 their
>>   7 the
>>   8 them
>>   9 these
>>
>> The cursor is in line 1 and I have 'nowrapscan' set. I search for "the" and
>> press CTRL-N 7 times and "the" in "these" is highlighted. Now I press
>> CTRL-L to copy "s" and then erase it. Now if I press CTRL-P, I expect
>> that the cursor will move to line 8. Instead the cursor moves to line 7.
>>
>> Another problem: Place the cursor in line 1. Enter "/thes" and then press
>> CTRL-N. The "thes" in line 9 is highlighted. Now if you press backspace,
>> the cursor jumps back to line 3. I expected that the cursor will remain
>> in line 9.
> Thanks, will look at these and add some tests.
>
>> I think, the CTRL-N and CTRL-P should respect the search direction.
>> For example, if I search a pattern using "?text", pressing CTRL-N
>> should search backwards. Currently CTRL-N always searches
>> forward (irrespective of the search direction). Note that this is
>> different from how "n" and "N" work.
> Please don't make me do this. Currently the inconsistent search 
> direction is one of my biggest annoyances of Vim. I really really really 
> hate it, that I can't rely on the fact that N searches backwards and n 
> forward.
>
> (I even made a patch, to make this configurable 
> https://github.com/chrisbra/vim-mq-patches/blob/master/cpo-N
> and this is one of the reasons, I made gn always search forward).
>
That's because, Christian, you keep your eyes on the front of your
head.  You need to move them to back of your head occasionally, and that
way you'll get used to the idea.
:)

Regards,
Chip Campbell

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Patch 7.4.2118

2016-07-29 Fir de Conversatie Bram Moolenaar

Patch 7.4.2118
Problem:Mac: can't build with tiny features.
Solution:   Don't define FEAT_CLIPBOARD unconditionally. (Kazunobu Kuriyama)
Files:  src/vim.h


*** ../vim-7.4.2117/src/vim.h   2016-07-26 22:02:50.147766335 +0200
--- src/vim.h   2016-07-29 20:58:47.734859474 +0200
***
*** 98,108 
  # ifndef HAVE_CONFIG_H
  #  define UNIX
  # endif
! # ifndef FEAT_CLIPBOARD
  #  define FEAT_CLIPBOARD
! #  if defined(FEAT_SMALL) && !defined(FEAT_MOUSE)
! #   define FEAT_MOUSE
! #  endif
  # endif
  #endif
  #if defined(MACOS_X) || defined(MACOS_CLASSIC)
--- 98,108 
  # ifndef HAVE_CONFIG_H
  #  define UNIX
  # endif
! # if defined(FEAT_SMALL) && !defined(FEAT_CLIPBOARD)
  #  define FEAT_CLIPBOARD
! # endif
! # if defined(FEAT_SMALL) && !defined(FEAT_MOUSE)
! #  define FEAT_MOUSE
  # endif
  #endif
  #if defined(MACOS_X) || defined(MACOS_CLASSIC)
*** ../vim-7.4.2117/src/version.c   2016-07-29 20:50:19.863640329 +0200
--- src/version.c   2016-07-29 20:59:24.086517317 +0200
***
*** 760,761 
--- 760,763 
  {   /* Add new patch number below this line */
+ /**/
+ 2118,
  /**/

-- 
Snoring is prohibited unless all bedroom windows are closed and securely
locked.
[real standing law in Massachusetts, United States of America]

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Patch 7.4.2117

2016-07-29 Fir de Conversatie Bram Moolenaar

Patch 7.4.2117
Problem:Deleting an augroup that still has autocmds does not give a
warning.  The next defined augroup takes its place.
Solution:   Give a warning and prevent the index being used for another group
name.
Files:  src/fileio.c, src/testdir/test_autocmd.vim


*** ../vim-7.4.2116/src/fileio.c2016-07-26 20:43:37.016311805 +0200
--- src/fileio.c2016-07-29 20:39:53.537537790 +0200
***
*** 7758,7763 
--- 7758,7764 
   */
  static garray_T augroups = {0, 0, sizeof(char_u *), 10, NULL};
  #define AUGROUP_NAME(i) (((char_u **)augroups.ga_data)[i])
+ static char_u *deleted_augroup = NULL;
  
  /*
   * The ID of the current group.  Group 0 is the default one.
***
*** 7812,7818 
if (ap->group != AUGROUP_DEFAULT)
{
if (AUGROUP_NAME(ap->group) == NULL)
!   msg_puts_attr((char_u *)_("--Deleted--"), hl_attr(HLF_E));
else
msg_puts_attr(AUGROUP_NAME(ap->group), hl_attr(HLF_T));
msg_puts((char_u *)"  ");
--- 7813,7819 
if (ap->group != AUGROUP_DEFAULT)
{
if (AUGROUP_NAME(ap->group) == NULL)
!   msg_puts_attr(deleted_augroup, hl_attr(HLF_E));
else
msg_puts_attr(AUGROUP_NAME(ap->group), hl_attr(HLF_T));
msg_puts((char_u *)"  ");
***
*** 8009,8016 
EMSG2(_("E367: No such group: \"%s\""), name);
  else
  {
vim_free(AUGROUP_NAME(i));
!   AUGROUP_NAME(i) = NULL;
  }
  }
  
--- 8010,8040 
EMSG2(_("E367: No such group: \"%s\""), name);
  else
  {
+   event_T event;
+   AutoPat *ap;
+   int in_use = FALSE;
+ 
+   for (event = (event_T)0; (int)event < (int)NUM_EVENTS;
+   event = (event_T)((int)event + 1))
+   {
+   for (ap = first_autopat[(int)event]; ap != NULL; ap = ap->next)
+   if (ap->group == i)
+   {
+   give_warning((char_u *)_("W19: Deleting augroup that is 
still in use"), TRUE);
+   in_use = TRUE;
+   event = NUM_EVENTS;
+   break;
+   }
+   }
vim_free(AUGROUP_NAME(i));
!   if (in_use)
!   {
!   if (deleted_augroup == NULL)
!   deleted_augroup = (char_u *)_("--Deleted--");
!   AUGROUP_NAME(i) = deleted_augroup;
!   }
!   else
!   AUGROUP_NAME(i) = NULL;
  }
  }
  
***
*** 8024,8030 
  int   i;
  
  for (i = 0; i < augroups.ga_len; ++i)
!   if (AUGROUP_NAME(i) != NULL && STRCMP(AUGROUP_NAME(i), name) == 0)
return i;
  return AUGROUP_ERROR;
  }
--- 8048,8055 
  int   i;
  
  for (i = 0; i < augroups.ga_len; ++i)
!   if (AUGROUP_NAME(i) != NULL && AUGROUP_NAME(i) != deleted_augroup
!   && STRCMP(AUGROUP_NAME(i), name) == 0)
return i;
  return AUGROUP_ERROR;
  }
***
*** 8081,8090 
  void
  free_all_autocmds(void)
  {
  for (current_augroup = -1; current_augroup < augroups.ga_len;
++current_augroup)
do_autocmd((char_u *)"", TRUE);
! ga_clear_strings();
  }
  #endif
  
--- 8106,8125 
  void
  free_all_autocmds(void)
  {
+ int   i;
+ char_u*s;
+ 
  for (current_augroup = -1; current_augroup < augroups.ga_len;
++current_augroup)
do_autocmd((char_u *)"", TRUE);
! 
! for (i = 0; i < augroups.ga_len; ++i)
! {
!   s = ((char_u **)(augroups.ga_data))[i];
!   if (s != deleted_augroup)
!   vim_free(s);
! }
! ga_clear();
  }
  #endif
  
***
*** 9830,9836 
return (char_u *)"END";
  if (idx >= augroups.ga_len)   /* end of list */
return NULL;
! if (AUGROUP_NAME(idx) == NULL)/* skip deleted entries */
return (char_u *)"";
  return AUGROUP_NAME(idx); /* return a name */
  }
--- 9865,9872 
return (char_u *)"END";
  if (idx >= augroups.ga_len)   /* end of list */
return NULL;
! if (AUGROUP_NAME(idx) == NULL || AUGROUP_NAME(idx) == deleted_augroup)
!   /* skip deleted entries */
return (char_u *)"";
  return AUGROUP_NAME(idx); /* return a name */
  }
***
*** 9894,9900 
  {
  if (idx < augroups.ga_len)/* First list group names, if 
wanted */
  {
!   if (!include_groups || AUGROUP_NAME(idx) == NULL)
return (char_u *)"";/* skip deleted entries */
return AUGROUP_NAME(idx);   /* return a name */
  }
--- 9930,9937 
  {
  if (idx < augroups.ga_len)/* First list group names, if 
wanted */
  {
!   if (!include_groups 

Fix tiny build failure on OS X

2016-07-29 Fir de Conversatie Kazunobu Kuriyama
Hi,

I tried Patch 7.4.2114 and found that the tiny build fails on OS X (That's
not because of the patch, though).

While the file os_macosx.m, which implements the clipboard support for OS
X, is to be excluded from the source when --with-features=tiny
(configure.in:4238--4258), vim.h:102 unconditionally defines FEAT_CLIPBOARD
regardless of the given feature target.

That is the cause of the failure.

Hopefully, the attached patch fixes that.

Best regards,
Kazunobu Kuriyama

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


osx_tiny_build.patch
Description: Binary data


Re: Wish list for a more powerful search in Vim

2016-07-29 Fir de Conversatie Christian Brabandt
Hi Yegappan!

On Fr, 29 Jul 2016, Yegappan Lakshmanan wrote:

> Hi Christian,
> 
> On Thu, Jul 28, 2016 at 11:16 PM, Christian Brabandt  
> wrote:
> > On Do, 28 Jul 2016, Bram Moolenaar wrote:
> >
> >> I think it should.  Most users will have 'wrapscan' on, since it is the
> >> default.  If someone switches it off he must have a reason for it.
> >
> > okay, fixed with the latest version
> >
> 
> I tested the latest patch and the confirmed that the problems I reported 
> earlier
> are fixed. I saw some new issues. Take the following text:
> 
>   1
>   2 these
>   3 the
>   4 their
>   5 there
>   6 their
>   7 the
>   8 them
>   9 these
> 
> The cursor is in line 1 and I have 'nowrapscan' set. I search for "the" and
> press CTRL-N 7 times and "the" in "these" is highlighted. Now I press
> CTRL-L to copy "s" and then erase it. Now if I press CTRL-P, I expect
> that the cursor will move to line 8. Instead the cursor moves to line 7.
> 
> Another problem: Place the cursor in line 1. Enter "/thes" and then press
> CTRL-N. The "thes" in line 9 is highlighted. Now if you press backspace,
> the cursor jumps back to line 3. I expected that the cursor will remain
> in line 9.

Thanks, will look at these and add some tests.

> I think, the CTRL-N and CTRL-P should respect the search direction.
> For example, if I search a pattern using "?text", pressing CTRL-N
> should search backwards. Currently CTRL-N always searches
> forward (irrespective of the search direction). Note that this is
> different from how "n" and "N" work.

Please don't make me do this. Currently the inconsistent search 
direction is one of my biggest annoyances of Vim. I really really really 
hate it, that I can't rely on the fact that N searches backwards and n 
forward.

(I even made a patch, to make this configurable 
https://github.com/chrisbra/vim-mq-patches/blob/master/cpo-N
and this is one of the reasons, I made gn always search forward).

> A typo: The help text in cmdline.txt for CTRL-P refers to CTRL-N.
> 
>the current match is displayed then CTRL-N will move
>to the previous match

Will fix, thanks.

Mit freundlichen Grüßen
Christian
-- 
Phantasie ist etwas, das sich viele gar nicht vorstellen können.
-- Helmut Qualtinger

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Wish list for a more powerful search in Vim

2016-07-29 Fir de Conversatie Yegappan Lakshmanan
Hi Christian,

On Thu, Jul 28, 2016 at 11:16 PM, Christian Brabandt  wrote:
> On Do, 28 Jul 2016, Bram Moolenaar wrote:
>
>> I think it should.  Most users will have 'wrapscan' on, since it is the
>> default.  If someone switches it off he must have a reason for it.
>
> okay, fixed with the latest version
>

I tested the latest patch and the confirmed that the problems I reported earlier
are fixed. I saw some new issues. Take the following text:

  1
  2 these
  3 the
  4 their
  5 there
  6 their
  7 the
  8 them
  9 these

The cursor is in line 1 and I have 'nowrapscan' set. I search for "the" and
press CTRL-N 7 times and "the" in "these" is highlighted. Now I press
CTRL-L to copy "s" and then erase it. Now if I press CTRL-P, I expect
that the cursor will move to line 8. Instead the cursor moves to line 7.

Another problem: Place the cursor in line 1. Enter "/thes" and then press
CTRL-N. The "thes" in line 9 is highlighted. Now if you press backspace,
the cursor jumps back to line 3. I expected that the cursor will remain
in line 9.

I think, the CTRL-N and CTRL-P should respect the search direction.
For example, if I search a pattern using "?text", pressing CTRL-N
should search backwards. Currently CTRL-N always searches
forward (irrespective of the search direction). Note that this is
different from how "n" and "N" work.

A typo: The help text in cmdline.txt for CTRL-P refers to CTRL-N.

   the current match is displayed then CTRL-N will move
   to the previous match

- Yegappan

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Patch 7.4.2116

2016-07-29 Fir de Conversatie Bram Moolenaar

Patch 7.4.2116
Problem:The default vimrc for Windows is very conservative.
Solution:   Use the defaults.vim in the Windows installer.
Files:  src/dosinst.c


*** ../vim-7.4.2115/src/dosinst.c   2016-06-08 21:17:39.045193558 +0200
--- src/dosinst.c   2016-07-29 18:15:57.718778771 +0200
***
*** 1153,1162 
fprintf(fd, "set compatible\n");
break;
case compat_some_enhancements:
!   fprintf(fd, "set nocompatible\n");
break;
case compat_all_enhancements:
-   fprintf(fd, "set nocompatible\n");
fprintf(fd, "source $VIMRUNTIME/vimrc_example.vim\n");
break;
  }
--- 1153,1161 
fprintf(fd, "set compatible\n");
break;
case compat_some_enhancements:
!   fprintf(fd, "source $VIMRUNTIME/defaults.vim\n");
break;
case compat_all_enhancements:
fprintf(fd, "source $VIMRUNTIME/vimrc_example.vim\n");
break;
  }
*** ../vim-7.4.2115/src/version.c   2016-07-29 18:13:29.136175634 +0200
--- src/version.c   2016-07-29 18:18:25.133390069 +0200
***
*** 760,761 
--- 760,763 
  {   /* Add new patch number below this line */
+ /**/
+ 2116,
  /**/

-- 
Biting someone with your natural teeth is "simple assault," while biting
someone with your false teeth is "aggravated assault."
[real standing law in Louisana, United States of America]

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Patch 7.4.2115

2016-07-29 Fir de Conversatie Bram Moolenaar

Patch 7.4.2115
Problem:Loading defaults.vim with -C argument.
Solution:   Don't load the defaults script with -C argument.  Test sourcing
the defaults script.  Set 'display' to "truncate".
Files:  src/main.c, src/Makefile, runtime/defaults.vim,
src/testdir/test_startup.vim, src/testdir/Make_all.mak


*** ../vim-7.4.2114/src/main.c  2016-07-28 22:22:39.978236440 +0200
--- src/main.c  2016-07-29 18:03:42.925676357 +0200
***
*** 90,95 
--- 90,97 
  
  static char_u *start_dir = NULL;  /* current working dir on startup */
  
+ static int has_dash_c_arg = FALSE;
+ 
  int
  # ifdef VIMDLL
  _export
***
*** 1928,1933 
--- 1930,1936 
  
case 'C':   /* "-C"  Compatible */
change_compatible(TRUE);
+   has_dash_c_arg = TRUE;
break;
  
case 'e':   /* "-e" Ex mode */
***
*** 3001,3007 
  #ifdef USR_EXRC_FILE2
&& do_source((char_u *)USR_EXRC_FILE2, FALSE, DOSO_NONE) == FAIL
  #endif
!   )
{
/* When no .vimrc file was found: source defaults.vim. */
do_source((char_u *)VIM_DEFAULTS_FILE, FALSE, DOSO_NONE);
--- 3004,3010 
  #ifdef USR_EXRC_FILE2
&& do_source((char_u *)USR_EXRC_FILE2, FALSE, DOSO_NONE) == FAIL
  #endif
!   && !has_dash_c_arg)
{
/* When no .vimrc file was found: source defaults.vim. */
do_source((char_u *)VIM_DEFAULTS_FILE, FALSE, DOSO_NONE);
*** ../vim-7.4.2114/src/Makefile2016-07-29 16:15:13.038677979 +0200
--- src/Makefile2016-07-29 18:08:30.982973465 +0200
***
*** 2107,2112 
--- 2107,2113 
test_regexp_utf8 \
test_reltime \
test_ruby \
+   test_startup \
test_searchpos \
test_set \
test_sort \
*** ../vim-7.4.2114/runtime/defaults.vim2016-07-28 22:22:39.982236402 
+0200
--- runtime/defaults.vim2016-07-29 18:10:01.370125305 +0200
***
*** 1,7 
  " The default vimrc file.
  "
  " Maintainer: Bram Moolenaar 
! " Last change:2016 Jul 28
  "
  " This is loaded if no vimrc file was found.
  " Except when Vim is run with "-u NONE" or "-C".
--- 1,7 
  " The default vimrc file.
  "
  " Maintainer: Bram Moolenaar 
! " Last change:2016 Jul 29
  "
  " This is loaded if no vimrc file was found.
  " Except when Vim is run with "-u NONE" or "-C".
***
*** 25,30 
--- 25,33 
  set showcmd   " display incomplete commands
  set wildmenu  " display completion matches in a status line
  
+ " Show @@@ in the last line if it is truncated.
+ set display=truncate
+ 
  " Do incremental searching when it's possible to timeout.
  if has('reltime')
set incsearch
*** ../vim-7.4.2114/src/testdir/test_startup.vim2016-07-29 
18:12:56.652480468 +0200
--- src/testdir/test_startup.vim2016-07-29 18:08:00.031263900 +0200
***
*** 0 
--- 1,8 
+ " Check that loading startup.vim works.
+ 
+ func Test_startup_script()
+   set compatible
+   source $VIMRUNTIME/defaults.vim
+ 
+   call assert_equal(0, )
+ endfunc
*** ../vim-7.4.2114/src/testdir/Make_all.mak2016-07-29 16:15:13.038677979 
+0200
--- src/testdir/Make_all.mak2016-07-29 18:08:20.607070828 +0200
***
*** 184,189 
--- 184,190 
test_perl.res \
test_quickfix.res \
test_ruby.res \
+   test_startup.res \
test_stat.res \
test_syntax.res \
test_textobjects.res \
*** ../vim-7.4.2114/src/version.c   2016-07-29 17:03:48.863345220 +0200
--- src/version.c   2016-07-29 18:08:58.106718948 +0200
***
*** 760,761 
--- 760,763 
  {   /* Add new patch number below this line */
+ /**/
+ 2115,
  /**/

-- 
It is illegal to rob a bank and then shoot at the bank teller with a water
pistol.
[real standing law in Louisana, United States of America]

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Patch 7.4.2114

2016-07-29 Fir de Conversatie Bram Moolenaar

Patch 7.4.2114
Problem:Tiny build fails.
Solution:   Always include vim_time().
Files:  src/ex_cmds.c


*** ../vim-7.4.2113/src/ex_cmds.c   2016-07-26 22:02:50.143766373 +0200
--- src/ex_cmds.c   2016-07-29 17:03:09.887709173 +0200
***
*** 2867,2873 
  }
  #endif /* FEAT_VIMINFO */
  
- #if defined(FEAT_CMDHIST) || defined(FEAT_VIMINFO) || defined(PROTO)
  /*
   * Return the current time in seconds.  Calls time(), unless test_settime()
   * was used.
--- 2867,2872 
***
*** 2881,2887 
  return time(NULL);
  # endif
  }
- #endif
  
  /*
   * Implementation of ":fixdel", also used by get_stty().
--- 2880,2885 
*** ../vim-7.4.2113/src/version.c   2016-07-29 16:15:13.038677979 +0200
--- src/version.c   2016-07-29 17:03:01.699785626 +0200
***
*** 760,761 
--- 760,763 
  {   /* Add new patch number below this line */
+ /**/
+ 2114,
  /**/

-- 
Kisses may last for as much as, but no more than, five minutes.
[real standing law in Iowa, United States of America]

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[patch] Lambda with closure (Re: Got E121: Undefined variable in lambda function)

2016-07-29 Fir de Conversatie Ken Takata
Hi,

2016/7/29 Fri 20:29:33 UTC+9 Ken Takata wrote:
> > > > Sorry, that was confusing. I rearranged the patches:
> > > > 
> > > > 1. Lambda with capture-by-value:
> > > >
> > > > https://bitbucket.org/k_takata/vim-ktakata-mq/src/9a62b8ce9304e1c0f78c70d524c1d8d8a8015cc7/lambda-capture_by_value.patch?at=default
> > > > 
> > > > 2. Lambda with capture-by-reference:
> > > >
> > > > https://bitbucket.org/k_takata/vim-ktakata-mq/src/9a62b8ce9304e1c0f78c70d524c1d8d8a8015cc7/lambda-capture_by_reference.patch?at=default
> > > > 
> > > > 3. Closure with normal functions:
> > > >
> > > > https://bitbucket.org/k_takata/vim-ktakata-mq/src/9a62b8ce9304e1c0f78c70d524c1d8d8a8015cc7/closure.patch?at=default
> > > > 
> > > > #1 and #2 are exclusive. We need to decide which one will be included, 
> > > > but
> > > > now I think #1 has no merits.
> > > > #3 needs to be applied on top of #2.
> > > 
> > > The patches #2 and #3 are updated:
> > > 
> > > 2. Lambda with capture-by-reference:
> > >
> > > https://bitbucket.org/k_takata/vim-ktakata-mq/src/d6b0edc0785baa51bead7f00271fb7bec484f69e/lambda-capture_by_reference.patch?at=default
> > > 
> > > 3. Closure with normal functions:
> > >
> > > https://bitbucket.org/k_takata/vim-ktakata-mq/src/d6b0edc0785baa51bead7f00271fb7bec484f69e/closure.patch?at=default
> > > 
> > > Fixed memory leaks and double free problems.
> > > Now all tests pass.
> > 
> > Thanks.  I'll have a look and when it looks good I'll include it.
> 
> The patch #2 is slightly updated. Some old codes and comments were remained.
> #3 is the same as before.
> 
> 2. Lambda with capture-by-reference:
>
> https://bitbucket.org/k_takata/vim-ktakata-mq/src/ffee5ce8c564f71ddbd3b8b6abd8814583472f94/lambda-capture_by_reference.patch?at=default
> 
> 3. Closure with normal functions:
>
> https://bitbucket.org/k_takata/vim-ktakata-mq/src/d6b0edc0785baa51bead7f00271fb7bec484f69e/closure.patch?at=default

An additional patch for #3 is here:

4. Support unlet in closure:
   
https://bitbucket.org/k_takata/vim-ktakata-mq/src/6fd892383533a9a4499665188b413dc10fb86657/closure-unlet.patch?at=default

This enables unletting outer scope variables from a closure.  I'm not sure
how this is useful.  BTW, now all the features in mattn's lambda patch are
ported on top of the latest code base.


Regards,
Ken Takata

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Sign column always present

2016-07-29 Fir de Conversatie Christian Brabandt
On Mi, 08 Jan 2014, Bram Moolenaar wrote:
> Nope.  Depends on what other things get reported, how much time I can
> spend on Vim and magic.

Here is an updated patch, that applies cleanly to current Vim.
Patch also available at 
https://github.com/chrisbra/vim-mq-patches/blob/master/set_signcolumn

Since this is an old mail, I include the commit message here:
,
| The 'signcolumn' option, which can have the values of yes,no,auto
| controls if a signcolumn will be drawn.
| 
| By default, the value is auto, which is the old behaviour and means,
| only draw the signcolumn, if a sign has been placed. However, that means
| whenever previously there was no sign present and you place a new sign,
| this will shift the text to the right and whenever the last sign will be
| removed, the text will be shifted left again.
| 
| Therefore, make a new option 'signcolumn' that the user can set so that
| either there will always be displayed a signcolumn (no matter whether
| there is a sign placed in the current window) or never (even if a sign
| is present). This prevents the ugly shifting of the text.
| 
| Because of the shifting, popular plugins like vim-gitgutter have
| workaround the issue by always placing an dummy sign so that there will
| always be a (invisible) sign available. However it would be great not to
| rely on that ugly workaround.
`

Mit freundlichen Grüßen
Christian
-- 
Sie glaubt an Gott, aber sie glaubt auch, daß das Radio wegen den
winzigen Leuten dadrin funktioniert.
-- Woody Allen (eigentlich: Woody Stewart)

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
From b4c63116ddf44b7fe2cdb429b7851c42360423e4 Mon Sep 17 00:00:00 2001
From: Christian Brabandt 
Date: Fri, 29 Jul 2016 10:22:40 +0200
Subject: [PATCH] New signcolumn option

This option, which can have the values of yes,no,auto
controls if a signcolumn will be drawn.

By default, the value is auto, which is the old behaviour and means,
only draw the signcolumn, if a sign has been placed. However, that means
whenever previously there was no sign present and you place a new sign,
this will shift the text to the right and whenever the last sign will be
removed, the text will be shifted left again.

Therefore, make a new option 'signcolumn' that the user can set so that
either there will always be displayed a signcolumn (no matter whether
there is a sign placed in the current window) or never (even if a sign
is present). This prevents the ugly shifting of the text.

Because of the shifting, popular plugins like vim-gitgutter have
workaround the issue by always placing an dummy sign so that there will
always be a (invisible) sign available. However it would be great not to
rely on that ugly workaround.
---
 runtime/doc/options.txt |  9 +
 runtime/optwin.vim  |  5 +
 src/edit.c  |  6 +-
 src/move.c  |  7 +--
 src/option.c| 50 +
 src/option.h|  6 ++
 src/proto/option.pro|  1 +
 src/screen.c| 17 -
 src/structs.h   |  4 
 9 files changed, 77 insertions(+), 28 deletions(-)

diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 680d85c..9f0cfeb 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -6535,6 +6535,15 @@ A jump table for the options with a short description 
can be found at |Q_op|.
When zero the 'ts' value will be used.  Use the |shiftwidth()|
function to get the effective shiftwidth value.
 
+   *'signcolumn'* *'sigc'*
+'signcolumn' 'sigc'string  (default "auto")
+   local to window
+   {not in Vi}
+   {not available when compiled without the |+signs|
+   feature}
+   Whether or not to draw the signcolumn. "auto" means, it will only be
+   drawn, when there is a sign to display.
+
*'shortmess'* *'shm'*
 'shortmess' 'shm'  string  (Vim default "filnxtToO", Vi default: "",
POSIX default: "A")
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index e534a91..6951ddd 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -1307,6 +1307,11 @@ call append("$", "\t(local to buffer)")
 call BinOptionL("bl")
 call append("$", "debug\tset to \"msg\" to see all error messages")
 call append("$", " \tset debug=" . )
+if has("signs")
+  call 

Re: Wish list for a more powerful search in Vim

2016-07-29 Fir de Conversatie Christian Brabandt
On Do, 28 Jul 2016, Bram Moolenaar wrote:

> I think it should.  Most users will have 'wrapscan' on, since it is the
> default.  If someone switches it off he must have a reason for it.

okay, fixed with the latest version

Best,
Christian
-- 
Das Gedruckte übt einen mächtigen Druck aus, der besondere Glaube 
ans Gedruckte ist einer der mächtigsten Aberglauben.
-- Ludwig Marcuse (Argumente und Rezepte)

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
From 74680771664103cf043a11cf96e47eb9693b9a51 Mon Sep 17 00:00:00 2001
From: Christian Brabandt 
Date: Tue, 26 Jul 2016 11:18:51 +0200
Subject: [PATCH] Make Ctrl-N/P jump to next/previous search match

Currently, you cannot move from one match to the next match
when doing a search '/' or '?'.
This patch adds the functionality to use 'Ctrl-N' to move the
cursor to the next match, if 'insearch' is set. Similarily 'Ctrl-P' will
move to the previous match.

Also c_CTRL-N and c_CTRL-P are already used to move within in history of
search patterns, I have for now made them something different in search
mode, when incsearch is set. This is because c_CTRL-L already does
something useful in search mode and second, because Ctrl-N and
Ctrl-P are already used to select next/previous match in completion mode
so it seems logically to also extend their use in search mode.

Bugfixes: - works correctly with Ctrl-P after ? search
  - after clearing the search command line, starts searching
	back at the original position
	  - works correctly, when using \? in a forward search / and
	then jumping backwards using Ctrl-P
	  - obey to 'wrapscan' setting
	  - beep, when no further match is found
---
 runtime/doc/cmdline.txt |  9 +
 src/ex_getln.c  | 96 +++--
 2 files changed, 103 insertions(+), 2 deletions(-)

diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt
index 8186678..83bec9e 100644
--- a/runtime/doc/cmdline.txt
+++ b/runtime/doc/cmdline.txt
@@ -409,11 +409,19 @@ CTRL-D		List names that match the pattern in front of the cursor.
 			*c_CTRL-N*
 CTRL-N		After using 'wildchar' which got multiple matches, go to next
 		match.  Otherwise recall more recent command-line from history.
+		*/_CTRL-N*
+		When 'incsearch' is set, entering a search pattern for "/" or
+		"?" and the current match is displayed then CTRL-N will move
+		to the next match (does not take |search-offset| into account)
 			*c_CTRL-P* *c_*
 CTRL-P		After using 'wildchar' which got multiple matches, go to
 		previous match.  Otherwise recall older command-line from
 		history.   only works with the GUI, on the Amiga and
 		with MS-DOS.
+		*/_CTRL-P*
+		When 'incsearch' is set, entering a search pattern for "/" or
+		"?" and the current match is displayed then CTRL-N will move
+		to the previous match (does not take |search-offset| into account).
 			*c_CTRL-A*
 CTRL-A		All names that match the pattern in front of the cursor are
 		inserted.
@@ -423,6 +431,7 @@ CTRL-L		A match is done on the pattern in front of the cursor.  If
 		If there are multiple matches the longest common part is
 		inserted in place of the pattern.  If the result is shorter
 		than the pattern, no completion is done.
+			*/_CTRL-L*
 		When 'incsearch' is set, entering a search pattern for "/" or
 		"?" and the current match is displayed then CTRL-L will add
 		one character from the end of the current match.  If
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 642e090..7862b0e 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -178,6 +178,8 @@ getcmdline(
 colnr_T	old_curswant;
 colnr_T	old_leftcol;
 linenr_T	old_topline;
+int		did_incs_move = FALSE;
+pos_T   cursor_start;
 # ifdef FEAT_DIFF
 int		old_topfill;
 # endif
@@ -224,6 +226,7 @@ getcmdline(
 ccline.overstrike = FALSE;		/* always start in insert mode */
 #ifdef FEAT_SEARCH_EXTRA
 old_cursor = curwin->w_cursor;	/* needs to be restored later */
+cursor_start = old_cursor;
 old_curswant = curwin->w_curswant;
 old_leftcol = curwin->w_leftcol;
 old_topline = curwin->w_topline;
@@ -996,6 +999,10 @@ getcmdline(
 
 		/* Truncate at the end, required for multi-byte chars. */
 		ccline.cmdbuff[ccline.cmdlen] = NUL;
+#ifdef FEAT_SEARCH_EXTRA
+		if (ccline.cmdlen == 0)
+			old_cursor = cursor_start;
+#endif
 		redrawcmd();
 		}
 		else if (ccline.cmdlen == 0 && c != Ctrl_W
@@ -1021,6