Re: problems with git and maintaining files

2016-08-21 Fir de Conversatie Marius Gedminas
On Fri, Aug 19, 2016 at 04:56:34PM -0400, Charles E Campbell wrote:
> Charles E Campbell wrote:
> > Christ van Willegen wrote:
> >> Op 19 aug. 2016 22:28 schreef "Charles E Campbell"
> >> >:
> >>> I tried git stash push instead of git push -- and it still doesn't work:
> >> Probably only 'stash' then...
> >>
> > That doesn't work either, unfortunately:
> >
> > runtime/syntax/sh.vim: needs merge
> > runtime/syntax/sh.vim: needs merge
> > runtime/syntax/sh.vim: unmerged (711971ea4ae7b3a72c2062c18130b3eca35dc67b)
> > runtime/syntax/sh.vim: unmerged (34b8ab79e45bb1f39827e940e4b3428bedfad64b)
> > runtime/syntax/sh.vim: unmerged (b285b04979551b260ab016ba089d9e69ded01612)
> > fatal: git-write-tree: error building trees
> > Cannot save the current index state
> > Mruntime/doc/syntax.txt
> > Uruntime/syntax/sh.vim
> > Pull is not possible because you have unmerged files.
> > Please, fix them up in the work tree, and then use 'git add/rm '
> > as appropriate to mark resolution, or use 'git commit -a'.
> > runtime/syntax/sh.vim: needs merge
> > Cannot apply to a dirty working tree, please stage your changes
> >
> Oh, well -- I tried several things based on web searches, and none of
> them worked.  I just went ahead and did what I know does work -- save
> off the affected files manually, wipe out the local copy, git clone
> https://github.com/vim/vim.git, and manually copy the affected files
> back to where they needed to be.

An entire full clone must be painful.  A simpler solution that doesn't
rely on any advanced git mastery would be

   mv runtime/syntax/sh.vim runtime/syntax/sh.vim.mine  # for each file
   git checkout .  # restore pristine upstream versions of every file
   git pull
   mv runtime/syntax/sh.vim.mine runtime/syntax/sh.vim  # for each file

HTH,
Marius Gedminas
-- 
To err is human, but to really foul things up requires a computer.

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


signature.asc
Description: PGP signature


Re: Vim 8 pre-announcement

2016-08-21 Fir de Conversatie Bram Moolenaar

Christian Brabandt wrote:

> On Di, 16 Aug 2016, Bram Moolenaar wrote:
> 
> > An overview of new features can be found in:
> > https://github.com/vim/vim/blob/master/runtime/doc/version8.txt
> > A version with links (but a day older):
> > http://vimhelp.appspot.com/version8.txt.html
> 
> Hm,
> ,[ :h new-items-8 ]-
> | Normal mode commands: 
> | 
> | g+g+  go to newer text state N times
> | g,g,  go to N newer position in change list
> | g-g-  go to older text state N times
> | g;g;  go to N older position in change list
> | g_g_  cursor to the last CHAR N - 1 lines lower
> `
> 
> Weren't those normal mode commands already available at Vim7?

Hmm, it appears they were missing from the index.txt help file, but they
were supported.  I'll remove them here.

-- 
The real
trick is
this: to
keep the
lines as
short as
possible
and keep
the size
the same
yet free
from the
need for
hyphena-
Dammit!!  (Matthew Winn)

 /// 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: Wish list for a more powerful search in Vim

2016-08-21 Fir de Conversatie Christian Brabandt
Hi Yegappan!

On Mo, 08 Aug 2016, Yegappan Lakshmanan wrote:

> In the above line with the cursor at the beginning of the line,
> search for "text", press  and then press .
> The expected behavior is for the cursor to be placed at the
> first "text". But the cursor is not moved and is still placed
> at the second "text".
> 
> If the pattern appears in a different line, then the problem is
> not seen. Example:
> 
> some text
> some text

Thanks for the feedback. Will send an update later this week.

Best,
Christian
-- 
Wie wechselt ein ein Windowsprogrammierer eine Glühbirne?
Gar nicht, ist ein Hardwareproblem!

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

2016-08-21 Fir de Conversatie John Marriott

On 21-Aug-2016 23:00, Bram Moolenaar wrote:

John Marriott wrote:


On 21-Aug-2016 02:37, Bram Moolenaar wrote:

Patch 7.4.2231
Problem:":oldfiles" output is a very long list.
Solution:   Add a pattern argument. (Coot, closes #575)
Files:  runtime/doc/starting.txt, src/ex_cmds.h, src/eval.c,
  src/ex_cmds.c, src/proto/eval.pro, src/proto/ex_cmds.pro,
  src/testdir/test_viminfo.vim



After this patch I get the following warning (on mingw64) if
FEAT_QUICKFIX is not defined:
gcc -c -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32
   -DFEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer
-freg-struct-return -s ex_cmds.c -o gobjnative/ex_cmds.o
ex_cmds.c: In function 'ex_oldfiles':
ex_cmds.c:8415:10: warning: implicit declaration of function
'skip_vimgrep_pat' [-Wimplicit-function-declaration]
if (skip_vimgrep_pat(eap->arg, _pat, NULL) == NULL)
^~~~
ex_cmds.c:8415:53: warning: comparison between pointer and integer
if (skip_vimgrep_pat(eap->arg, _pat, NULL) == NULL)
   ^~



I'll move it to a separte #ifdef block.  It's unusual that +eval is
included but +quickfix isn't.


After patch 2234 the linker error has gone but the warning remains.

The prototype for skip_vimgrep_pat() lives in quickfix.pro which is 
included in proto.h if FEAT_QUICKFIX is defined, but the function itself 
is called from ex_cmds.c (above) if either FEAT_EVAL or PROTO are defined.


So, given that skip_vimgrep_pat() has become useful for more than just 
the quickfix feature, should it be moved out of quickfix.c altogether 
(along with it's prototype)? If so, is there a preference? Perhaps one 
of the misc[12].c files?


--
--
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: Vim 8 pre-announcement

2016-08-21 Fir de Conversatie Christian Brabandt
Hi Bram!

On Di, 16 Aug 2016, Bram Moolenaar wrote:

> An overview of new features can be found in:
> https://github.com/vim/vim/blob/master/runtime/doc/version8.txt
> A version with links (but a day older):
> http://vimhelp.appspot.com/version8.txt.html

Hm,
,[ :h new-items-8 ]-
| Normal mode commands: 
| 
| g+g+  go to newer text state N times
| g,g,  go to N newer position in change list
| g-g-  go to older text state N times
| g;g;  go to N older position in change list
| g_g_  cursor to the last CHAR N - 1 lines lower
`

Weren't those normal mode commands already available at Vim7?

Best,
Christian
-- 
Die Partei ist die Kampfgemeinschaft von Intimfeinden.
-- Helmar Nahr

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

2016-08-21 Fir de Conversatie Bram Moolenaar

Patch 7.4.2238
Problem:With SGR mouse reporting (suckless terminal) the mouse release and
scroll up/down is confused.
Solution:   Don't see a release as a scroll up/down. (Ralph Eastwood)
Files:  src/term.c


*** ../vim-7.4.2237/src/term.c  2016-08-14 16:07:44.725705357 +0200
--- src/term.c  2016-08-21 21:01:24.836288814 +0200
***
*** 4939,4945 
button = getdigits();
mouse_code = 0;
  
!   switch( button )
{
case 4: mouse_code = MOUSE_LEFT; break;
case 1: mouse_code = MOUSE_RIGHT; break;
--- 4939,4945 
button = getdigits();
mouse_code = 0;
  
!   switch (button)
{
case 4: mouse_code = MOUSE_LEFT; break;
case 1: mouse_code = MOUSE_RIGHT; break;
***
*** 4947,4953 
default: return -1;
}
  
!   switch( action )
{
case 31: /* Initial press */
if (*p++ != ';')
--- 4947,4953 
default: return -1;
}
  
!   switch (action)
{
case 31: /* Initial press */
if (*p++ != ';')
***
*** 5096,5104 
else if (orig_num_clicks == 4)
modifiers |= MOD_MASK_4CLICK;
  
!   /* Work out our pseudo mouse event */
key_name[0] = (int)KS_EXTRA;
!   if (wheel_code != 0)
{
if (wheel_code & MOUSE_CTRL)
modifiers |= MOD_MASK_CTRL;
--- 5096,5106 
else if (orig_num_clicks == 4)
modifiers |= MOD_MASK_4CLICK;
  
!   /* Work out our pseudo mouse event. Note that MOUSE_RELEASE gets
!* added, then it's not mouse up/down. */
key_name[0] = (int)KS_EXTRA;
! if (wheel_code != 0
! && (wheel_code & MOUSE_RELEASE) != MOUSE_RELEASE)
{
if (wheel_code & MOUSE_CTRL)
modifiers |= MOD_MASK_CTRL;
*** ../vim-7.4.2237/src/version.c   2016-08-21 19:07:14.265008108 +0200
--- src/version.c   2016-08-21 21:02:29.511705696 +0200
***
*** 765,766 
--- 765,768 
  {   /* Add new patch number below this line */
+ /**/
+ 2238,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
44. Your friends no longer send you e-mail...they just log on to your IRC
channel.

 /// 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.2236

2016-08-21 Fir de Conversatie Bram Moolenaar

Patch 7.4.2236
Problem:The 'langnoremap' option leads to double negatives.  And it does
not work for the last character of a mapping.
Solution:   Add 'langremap' with the opposite value.  Keep 'langnoremap' for
backwards compatibility.  Make it work for the last character of a
mapping.  Make the test work.
Files:  runtime/doc/options.txt, runtime/defaults.vim, src/option.c,
src/option.h, src/macros.h, src/testdir/test_mapping.vim


*** ../vim-7.4.2235/runtime/doc/options.txt 2016-08-20 16:56:48.250624340 
+0200
--- runtime/doc/options.txt 2016-08-21 16:42:21.557677230 +0200
***
*** 4623,4635 
feature}
This option allows switching your keyboard into a special language
mode.  When you are typing text in Insert mode the characters are
!   inserted directly.  When in command mode the 'langmap' option takes
care of translating these special characters to the original meaning
of the key.  This means you don't have to change the keyboard mode to
be able to execute Normal mode commands.
This is the opposite of the 'keymap' option, where characters are
mapped in Insert mode.
!   Also consider setting 'langnoremap' to avoid 'langmap' applies to
characters resulting from a mapping.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
--- 4626,4638 
feature}
This option allows switching your keyboard into a special language
mode.  When you are typing text in Insert mode the characters are
!   inserted directly.  When in Normal mode the 'langmap' option takes
care of translating these special characters to the original meaning
of the key.  This means you don't have to change the keyboard mode to
be able to execute Normal mode commands.
This is the opposite of the 'keymap' option, where characters are
mapped in Insert mode.
!   Also consider resetting 'langremap' to avoid 'langmap' applies to
characters resulting from a mapping.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
***
*** 4686,4701 
:source $VIMRUNTIME/menu.vim
  < Warning: This deletes all menus that you defined yourself!
  
!   *'langnoremap'* *'lnr'*
! 'langnoremap' 'lnr'   boolean (default off)
global
{not in Vi}
{only available when compiled with the |+langmap|
feature}
!   When on, setting 'langmap' does not apply to characters resulting from
a mapping.  This basically means, if you noticed that setting
!   'langmap' disables some of your mappings, try setting this option.
!   This option defaults to off for backwards compatibility.  Set it on if
that works for you to avoid mappings to break.
  
*'laststatus'* *'ls'*
--- 4689,4714 
:source $VIMRUNTIME/menu.vim
  < Warning: This deletes all menus that you defined yourself!
  
!   *'langnoremap'* *'lnr'* *'nolangnoremap'* *'nolnr'*
! 'langnoremap' 'lnr'   boolean (default off, set in |defaults.vim|)
!   global
!   {not in Vi}
!   {only available when compiled with the |+langmap|
!   feature}
!   This is just like 'langremap' but with the value inverted.  It only
!   exists for backwards compatibility.  When setting 'langremap' then
!   'langnoremap' is set to the inverted value, and the other way around.
! 
!   *'langremap'* *'lrm'* *'nolangremap'* *'nolrm'*
! 'langremap' 'lrm' boolean (default on, reset in |defaults.vim|)
global
{not in Vi}
{only available when compiled with the |+langmap|
feature}
!   When off, setting 'langmap' does not apply to characters resulting from
a mapping.  This basically means, if you noticed that setting
!   'langmap' disables some of your mappings, try resetting this option.
!   This option defaults to on for backwards compatibility.  Set it off if
that works for you to avoid mappings to break.
  
*'laststatus'* *'ls'*
*** ../vim-7.4.2235/runtime/defaults.vim2016-08-20 19:22:13.412939701 
+0200
--- runtime/defaults.vim2016-08-21 16:35:40.737234768 +0200
***
*** 1,7 
  " The default vimrc file.
  "
  " Maintainer: Bram Moolenaar 
! " Last change:2016 Aug 20
  "
  " This is loaded if no vimrc file was found.
  " Except when Vim is run with "-u NONE" or "-C".
--- 1,7 
  " The default vimrc 

Re: ftp.vim.org down?

2016-08-21 Fir de Conversatie Bram Moolenaar

Elimar Riesebieter wrote:

> ping ftp.vim.org
> 
> PING ftp.vim.org(ftp.nluug.nl (2001:67c:6ec:221:145:220:21:40)) 56 data bytes
> 
> --- ftp.vim.org ping statistics ---
> 3 packets transmitted, 0 received, 100% packet loss, time 2025ms

Yes, it's broken.  Unknown when it will be repaired.

-- 
"Oh, no!  NOT the Spanish Inquisition!"
"NOBODY expects the Spanish Inquisition!!!"
-- Monty Python sketch --
"Oh, no!  NOT another option!"
"EVERYBODY expects another option!!!"
-- Discussion in vim-dev mailing list --

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


[new feature] :tab modifier's counter supports dollar and relative number

2016-08-21 Fir de Conversatie h_east
Hi Bram and list,

I made a patch about :tab modifier counter.

Existing features:
:tab split  " opens current buffer in new tab page
:tab help gt" opens tab page with help for "gt"
:0tab help  " opens tab page with help before the first one

New features:
:.tab help gt   " same as `:tab help gt`
:+tab help  " opens tab page with help after the next tab page
:-tab help  " opens tab page with help before the current one
:$tab help  " opens tab page with help after the last one

Note:
If [counter] specified by absolute or relative values, It will perform the 
range check.
When it does out of range(0 ~ number of tabpages), error(E16) occurs.

Check it and include 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/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt
index b98c18b..f2444c0 100644
--- a/runtime/doc/tabpage.txt
+++ b/runtime/doc/tabpage.txt
@@ -87,14 +87,21 @@ In the GUI tab pages line you can use the right mouse button to open menu.
 		Execute {cmd} and when it opens a new window open a new tab
 		page instead.  Doesn't work for |:diffsplit|, |:diffpatch|,
 		|:execute| and |:normal|.
-		When [count] is omitted the tab page appears after the current
-		one.
-		When [count] is specified the new tab page comes after tab
-		page [count].  Use ":0tab cmd" to get the new tab page as the
-		first one.
+		If [count] is given the new tab page appears after the tab
+		page [count] otherwise the new tab page will appear after the
+		current one.
 		Examples: >
-			:tab split	" opens current buffer in new tab page
-			:tab help gt	" opens tab page with help for "gt"
+		:tab split	" opens current buffer in new tab page
+		:tab help gt" opens tab page with help for "gt"
+		:.tab help gt   " as above
+		:+tab help	" opens tab page with help after the next
+" tab page
+		:-tab help	" opens tab page with help before the
+" current one
+		:0tab help	" opens tab page with help before the
+" first one
+		:$tab help	" opens tab page with help after the last
+" one
 
 CTRL-W gf	Open a new tab page and edit the file name under the cursor.
 		See |CTRL-W_gf|.
@@ -141,10 +148,11 @@ something else.
 		given, then they become hidden.  But modified buffers are
 		never abandoned, so changes cannot get lost. >
 		:tabonly	" close all tab pages except the current
+" one
 
 :{count}tabo[nly][!]
 		Close all tab pages except the {count}th one. >
-		:.tabonly	" one
+		:.tabonly	" as above
 		:-tabonly	" close all tab pages except the previous
 " one
 		:+tabonly	" close all tab pages except the next one
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 1a7fbfa..9f1d227 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -1858,9 +1858,7 @@ do_one_cmd(
 /*
  * 2. Handle command modifiers.
  */
-	p = ea.cmd;
-	if (VIM_ISDIGIT(*ea.cmd))
-	p = skipwhite(skipdigits(ea.cmd));
+	p = skip_range(ea.cmd, NULL);
 	switch (*p)
 	{
 	/* When adding an entry, also modify cmd_exists(). */
@@ -1992,10 +1990,19 @@ do_one_cmd(
 	case 't':	if (checkforcmd(, "tab", 3))
 			{
 #ifdef FEAT_WINDOWS
-			if (vim_isdigit(*ea.cmd))
-cmdmod.tab = atoi((char *)ea.cmd) + 1;
-			else
+			long tabnr = get_address(, , ADDR_TABS,
+ea.skip, FALSE);
+			if (tabnr == MAXLNUM)
 cmdmod.tab = tabpage_index(curtab) + 1;
+			else
+			{
+if (tabnr < 0 || tabnr > LAST_TAB_NR)
+{
+errormsg = (char_u *)_(e_invrange);
+goto doend;
+}
+cmdmod.tab = tabnr + 1;
+			}
 			ea.cmd = p;
 #endif
 			continue;
diff --git a/src/testdir/test_tabpage.vim b/src/testdir/test_tabpage.vim
index e6b85d6..f1c41e9 100644
--- a/src/testdir/test_tabpage.vim
+++ b/src/testdir/test_tabpage.vim
@@ -186,4 +186,36 @@ function Test_tabpage_with_autocmd()
   bw!
 endfunction
 
+function Test_tabpage_with_tab_modifier()
+  for n in range(4)
+tabedit
+  endfor
+
+  function s:check_tab(pre_nr, cmd, post_nr)
+exec 'tabnext ' . a:pre_nr
+exec a:cmd
+call assert_equal(a:post_nr, tabpagenr())
+call assert_equal('help', )
+helpclose
+  endfunc
+
+  call s:check_tab(1, 'tab help', 2)
+  call s:check_tab(1, '3tab help', 4)
+  call s:check_tab(1, '.tab help', 2)
+  call s:check_tab(1, '.+1tab help', 3)
+  call s:check_tab(1, '0tab help', 1)
+  call s:check_tab(2, '+tab help', 4)
+  call s:check_tab(2, '+2tab help', 5)
+  

Re: debugging vim

2016-08-21 Fir de Conversatie carmel zuk
On Sunday, August 21, 2016 at 4:00:24 PM UTC+3, Bram Moolenaar wrote:
> Carmel Zuk wrote:
> 
> > Hi all,
> > I'd like to debug vim with cgdb to understand how it works.
> > 
> > My problem is this:
> > when I run 
> > cgdb vim
> > I get the output in the cgdb console as binary.. I can't debug mouse 
> > actions or editing.
> > 
> > Is there a way to point vim to another terminal instance other than the 
> > cgdb?
> > 
> > or how would you suggest to go about this one?
> 
> I don't know cgdb, but with gdb you can use the -tty argument.
> You would start a terminal and make it not do anything, e.g. with
> "while true; do sleep 3600; done".  Then get it's device and pass it to
> gdb with -tty.
> 
> -- 
> Don't read everything you believe.
> 
>  /// 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///

Thank you very much sir.
very helpful.

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


ftp.vim.org down?

2016-08-21 Fir de Conversatie Elimar Riesebieter
ping ftp.vim.org

PING ftp.vim.org(ftp.nluug.nl (2001:67c:6ec:221:145:220:21:40)) 56 data bytes

--- ftp.vim.org ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2025ms



-- 
  You cannot propel yourself forward by
  patting yourself on the back.

-- 
-- 
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: Vim 8 pre-announcement

2016-08-21 Fir de Conversatie Michael Henry
On 08/18/2016 02:11 PM, Yegappan Lakshmanan wrote:
> On Thu, Aug 18, 2016 at 5:48 AM, Michael Henry 
wrote:
>> I was trying to find something in the help regarding the meaning
>> of a "window id".  Though there are several functions that
>> accept and return these, I can't find anything that defines
>> them.
>>
>
> The window identifier is described in windows.txt. I am copying
> the description below:

Thanks; that's exactly what I was hunting.  I've figured out why
I couldn't find it in the help.  I'd done the following two
searches that didn't turn up any hits in windows.txt::

  :helpgrep winid
  :helpgrep window.id

I hadn't realized that :helpgrep doesn't pay attention to
'ignorecase', which I've set in my .vimrc.  I've since learned
from the help on :helpgrep that I should have been using ``\c``
to get case-ignoring behavior like this::

  :helpgrep \cwindow.id

That finds the sole hit for "window ID" in windows.txt.

Thanks again,
Michael Henry

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

2016-08-21 Fir de Conversatie Bram Moolenaar

Patch 7.4.2235
Problem:submatch() does not check for a valid argument.
Solution:   Give an error if the argument is out of range. (Dominique Pelle)
Files:  src/evalfunc.c, src/testdir/test_expr.vim


*** ../vim-7.4.2234/src/evalfunc.c  2016-08-21 14:36:11.968845449 +0200
--- src/evalfunc.c  2016-08-21 15:21:22.084628024 +0200
***
*** 11491,11497 
  no = (int)get_tv_number_chk([0], );
  if (error)
return;
! error = FALSE;
  if (argvars[1].v_type != VAR_UNKNOWN)
retList = (int)get_tv_number_chk([1], );
  if (error)
--- 11491,11501 
  no = (int)get_tv_number_chk([0], );
  if (error)
return;
! if (no < 0 || no >= NSUBEXP)
! {
! EMSGN(_("E935: invalid submatch number: %d"), no);
! return;
! }
  if (argvars[1].v_type != VAR_UNKNOWN)
retList = (int)get_tv_number_chk([1], );
  if (error)
*** ../vim-7.4.2234/src/testdir/test_expr.vim   2016-08-21 14:36:11.968845449 
+0200
--- src/testdir/test_expr.vim   2016-08-21 15:23:33.719456292 +0200
***
*** 198,203 
--- 198,208 
call assert_equal('--', substitute('xxx', 'x*', {-> '-' . Recurse() . '-'}, 
''))
  endfunc
  
+ func Test_invalid_submatch()
+   " This was causing invalid memory access in Vim-7.4.2232 and older
+   call assert_fails("call substitute('x', '.', {-> submatch(10)}, '')", 
'E935:')
+ endfunc
+ 
  func Test_substitute_expr_arg()
call assert_equal('123456789-123456789=', substitute('123456789',
\ '\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)',
*** ../vim-7.4.2234/src/version.c   2016-08-21 14:59:59.916038353 +0200
--- src/version.c   2016-08-21 15:22:47.431868327 +0200
***
*** 765,766 
--- 765,768 
  {   /* Add new patch number below this line */
+ /**/
+ 2235,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
39. You move into a new house and decide to Netscape before you landscape.

 /// 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.2231

2016-08-21 Fir de Conversatie Bram Moolenaar

John Marriott wrote:

> On 21-Aug-2016 02:37, Bram Moolenaar wrote:
> > Patch 7.4.2231
> > Problem:":oldfiles" output is a very long list.
> > Solution:   Add a pattern argument. (Coot, closes #575)
> > Files:  runtime/doc/starting.txt, src/ex_cmds.h, src/eval.c,
> >  src/ex_cmds.c, src/proto/eval.pro, src/proto/ex_cmds.pro,
> >  src/testdir/test_viminfo.vim
> >
> >
> After this patch I get the following warning (on mingw64) if 
> FEAT_QUICKFIX is not defined:
> gcc -c -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
> -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32
>   -DFEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer 
> -freg-struct-return -s ex_cmds.c -o gobjnative/ex_cmds.o
> ex_cmds.c: In function 'ex_oldfiles':
> ex_cmds.c:8415:10: warning: implicit declaration of function 
> 'skip_vimgrep_pat' [-Wimplicit-function-declaration]
>if (skip_vimgrep_pat(eap->arg, _pat, NULL) == NULL)
>^~~~
> ex_cmds.c:8415:53: warning: comparison between pointer and integer
>if (skip_vimgrep_pat(eap->arg, _pat, NULL) == NULL)
>   ^~
> 
> Followed by this linker error:
> gcc -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF 
> -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32 -D
> FEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer 
> -freg-struct-return -s -Wl,-nxcompat,-dynamicbase -mwindows -o gvim.exe 
> gobjnative/arabic.o gobjnative/blowfish.o gobjnative/buffer.o 
> gobjnative/charset.o gobjnative/crypt.o gobjnative/crypt_zip.o 
> gobjnative/dict.o gobjnative/diff.o gobjnative/digraph.o 
> gobjnative/edit.o gobjnative/eval.o gobjnative/evalfunc.o 
> gobjnative/ex_cmds.o gobjnative/ex_cmds2.o gobjnative/ex_docmd.o 
> gobjnative/ex_eval.o gobjnative/ex_getln.o gobjnative/farsi.o 
> gobjnative/fileio.o gobjnative/fold.o gobjnative/getchar.o 
> gobjnative/hardcopy.o gobjnative/hashtab.o gobjnative/json.o 
> gobjnative/list.o gobjnative/main.o gobjnative/mark.o 
> gobjnative/memfile.o gobjnative/memline.o gobjnative/menu.o 
> gobjnative/message.o gobjnative/misc1.o gobjnative/misc2.o 
> gobjnative/move.o gobjnative/mbyte.o gobjnative/normal.o 
> gobjnative/ops.o gobjnative/option.o gobjnative/os_win32.o 
> gobjnative/os_mswin.o gobjnative/winclip.o gobjnative/pathdef.o 
> gobjnative/popupmnu.o gobjnative/quickfix.o gobjnative/regexp.o 
> gobjnative/screen.o gobjnative/search.o gobjnative/sha256.o 
> gobjnative/spell.o gobjnative/spellfile.o gobjnative/syntax.o 
> gobjnative/tag.o gobjnative/term.o gobjnative/ui.o gobjnative/undo.o 
> gobjnative/userfunc.o gobjnative/version.o gobjnative/vimrc.o 
> gobjnative/window.o gobjnative/gui.o gobjnative/gui_w32.o 
> gobjnative/gui_beval.o gobjnative/os_w32exe.o -lkernel32 -luser32 
> -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lversion -lole32 -luuid
> gobjnative/ex_cmds.o:ex_cmds.c:(.text+0xb229): undefined reference to 
> `skip_vimgrep_pat'
> collect2.exe: error: ld returned 1 exit status
> Make_cyg_ming.mak:829: recipe for target 'gvim.exe' failed
> make: *** [gvim.exe] Error 1
> 
> skip_vimgrep_pat() is defined in quickfix.c, but the contents are only 
> included if FEAT_QUICKFIX or PROTO is defined.

I'll move it to a separte #ifdef block.  It's unusual that +eval is
included but +quickfix isn't.

-- 
Don't believe everything you hear or anything you say.

 /// 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.2234

2016-08-21 Fir de Conversatie Bram Moolenaar

Patch 7.4.2234
Problem:Can't build with +eval but without +quickfix. (John Marriott)
Solution:   Move skip_vimgrep_pat() to separate #ifdef block.
Files:  src/quickfix.c


*** ../vim-7.4.2233/src/quickfix.c  2016-08-12 16:29:03.347068413 +0200
--- src/quickfix.c  2016-08-21 14:55:42.638348358 +0200
***
*** 4319,4376 
  }
  
  /*
-  * Skip over the pattern argument of ":vimgrep /pat/[g][j]".
-  * Put the start of the pattern in "*s", unless "s" is NULL.
-  * If "flags" is not NULL put the flags in it: VGR_GLOBAL, VGR_NOJUMP.
-  * If "s" is not NULL terminate the pattern with a NUL.
-  * Return a pointer to the char just past the pattern plus flags.
-  */
- char_u *
- skip_vimgrep_pat(char_u *p, char_u **s, int *flags)
- {
- int   c;
- 
- if (vim_isIDc(*p))
- {
-   /* ":vimgrep pattern fname" */
-   if (s != NULL)
-   *s = p;
-   p = skiptowhite(p);
-   if (s != NULL && *p != NUL)
-   *p++ = NUL;
- }
- else
- {
-   /* ":vimgrep /pattern/[g][j] fname" */
-   if (s != NULL)
-   *s = p + 1;
-   c = *p;
-   p = skip_regexp(p + 1, c, TRUE, NULL);
-   if (*p != c)
-   return NULL;
- 
-   /* Truncate the pattern. */
-   if (s != NULL)
-   *p = NUL;
-   ++p;
- 
-   /* Find the flags */
-   while (*p == 'g' || *p == 'j')
-   {
-   if (flags != NULL)
-   {
-   if (*p == 'g')
-   *flags |= VGR_GLOBAL;
-   else
-   *flags |= VGR_NOJUMP;
-   }
-   ++p;
-   }
- }
- return p;
- }
- 
- /*
   * Restore current working directory to "dirname_start" if they differ, taking
   * into account whether it is set locally or globally.
   */
--- 4319,4324 
***
*** 5207,5209 
--- 5155,5211 
  }
  
  #endif /* FEAT_QUICKFIX */
+ 
+ #if defined(FEAT_QUICKFIX) || defined(FEAT_EVAL) || defined(PROTO)
+ /*
+  * Skip over the pattern argument of ":vimgrep /pat/[g][j]".
+  * Put the start of the pattern in "*s", unless "s" is NULL.
+  * If "flags" is not NULL put the flags in it: VGR_GLOBAL, VGR_NOJUMP.
+  * If "s" is not NULL terminate the pattern with a NUL.
+  * Return a pointer to the char just past the pattern plus flags.
+  */
+ char_u *
+ skip_vimgrep_pat(char_u *p, char_u **s, int *flags)
+ {
+ int   c;
+ 
+ if (vim_isIDc(*p))
+ {
+   /* ":vimgrep pattern fname" */
+   if (s != NULL)
+   *s = p;
+   p = skiptowhite(p);
+   if (s != NULL && *p != NUL)
+   *p++ = NUL;
+ }
+ else
+ {
+   /* ":vimgrep /pattern/[g][j] fname" */
+   if (s != NULL)
+   *s = p + 1;
+   c = *p;
+   p = skip_regexp(p + 1, c, TRUE, NULL);
+   if (*p != c)
+   return NULL;
+ 
+   /* Truncate the pattern. */
+   if (s != NULL)
+   *p = NUL;
+   ++p;
+ 
+   /* Find the flags */
+   while (*p == 'g' || *p == 'j')
+   {
+   if (flags != NULL)
+   {
+   if (*p == 'g')
+   *flags |= VGR_GLOBAL;
+   else
+   *flags |= VGR_NOJUMP;
+   }
+   ++p;
+   }
+ }
+ return p;
+ }
+ #endif
*** ../vim-7.4.2233/src/version.c   2016-08-21 14:36:11.968845449 +0200
--- src/version.c   2016-08-21 14:57:59.461119768 +0200
***
*** 765,766 
--- 765,768 
  {   /* Add new patch number below this line */
+ /**/
+ 2234,
  /**/

-- 
I started out with nothing, and I still have most of it.
-- Michael Davis -- "Tonight Show"

 /// 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: debugging vim

2016-08-21 Fir de Conversatie Bram Moolenaar

Carmel Zuk wrote:

> Hi all,
> I'd like to debug vim with cgdb to understand how it works.
> 
> My problem is this:
> when I run 
> cgdb vim
> I get the output in the cgdb console as binary.. I can't debug mouse actions 
> or editing.
> 
> Is there a way to point vim to another terminal instance other than the cgdb?
> 
> or how would you suggest to go about this one?

I don't know cgdb, but with gdb you can use the -tty argument.
You would start a terminal and make it not do anything, e.g. with
"while true; do sleep 3600; done".  Then get it's device and pass it to
gdb with -tty.

-- 
Don't read everything you believe.

 /// 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: Changing the defaults with Vim 8

2016-08-21 Fir de Conversatie Michael Henry
On 08/20/2016 01:22 PM, Bram Moolenaar wrote:
> Hirohito Higashi wrote:
>> `set ttimeoutlen=0` will solve the above.
>>
>> I have invested in above setting more than a year, but the
>> trouble does not happen even once.
>
> Zero only works when you are directly using a terminal.  When
> using a remote shell it might not work properly.  But one
> second is indeed too much.
>
> I have it set to 200, this still has some lag.  I think 100
> would work for just about everyone.

I ran for a long time without trouble using 50 milliseconds.
But even this eventually proved too long once I began using
Alt-letter mappings in console Vim.  The key sequence for Alt-j
is j.  I would frequently press  to exit insert mode
followed quickly by the j key, and Vim would misinterpret the
sequence as Alt-j (which would then invoke my insert-mode
mapping for Alt-j).  I found experimentally that I could set
ttimeoutlen to 5 to avoid most instances of this kind of
incorrect key interpretation.  This value has never proved to be
too small in my use.  I've never noticed a case of Vim timing
out in the middle of a valid multi-key sequence and splitting it
incorrectly into multiple keypresses, even when using Vim across
an SSH connection; however, these connections were typically
done over a local Ethernet, so on a slower network it's possible
that such splitting could occur (such that Alt-j might be split
erroneously into  followed by j).  I consider this an
unlikely case, since the multi-key sequence will probably be
written to the network as a unit and carried in a single network
packet, regardless of the speed of the network; still, until we
start using uniquely decodable key sequences so we don't have to
rely on timeouts, there will always be some risk of incorrect
key interpretation.

I think 100ms is better than 200ms as a default.  I wouldn't
suggest a default as low as 5ms due to the possible risk of
misinterpreting multi-byte key sequences, even though I've never
personally noticed such a failure.  Users like myself who
require shorter values can always override the default.  I'll
also note that I've seen 100ms used elsewhere, such as in Tim
Pope's "Sensible Defaults" plugin:
https://github.com/tpope/vim-sensible/blob/master/plugin/sensible.vim#L28

Michael Henry

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

2016-08-21 Fir de Conversatie Bram Moolenaar

Patch 7.4.2233
Problem:Crash when using funcref() with invalid name. (Dominique Pelle)
Solution:   Check for NULL translated name.
Files:  src/evalfunc.c, src/testdir/test_expr.vim


*** ../vim-7.4.2232/src/evalfunc.c  2016-08-18 21:22:00.966648696 +0200
--- src/evalfunc.c  2016-08-21 14:35:31.997204847 +0200
***
*** 3587,3594 
use_string = TRUE;
  }
  
! if (((use_string && vim_strchr(s, AUTOLOAD_CHAR) == NULL)
!  || is_funcref))
  {
name = s;
trans_name = trans_function_name(, FALSE,
--- 3587,3593 
use_string = TRUE;
  }
  
! if ((use_string && vim_strchr(s, AUTOLOAD_CHAR) == NULL) || is_funcref)
  {
name = s;
trans_name = trans_function_name(, FALSE,
***
*** 3597,3603 
s = NULL;
  }
  
! if (s == NULL || *s == NUL || (use_string && VIM_ISDIGIT(*s)))
EMSG2(_(e_invarg2), s);
  /* Don't check an autoload name for existence here. */
  else if (trans_name != NULL && (is_funcref
--- 3596,3603 
s = NULL;
  }
  
! if (s == NULL || *s == NUL || (use_string && VIM_ISDIGIT(*s))
!|| (is_funcref && trans_name == NULL))
EMSG2(_(e_invarg2), s);
  /* Don't check an autoload name for existence here. */
  else if (trans_name != NULL && (is_funcref
*** ../vim-7.4.2232/src/testdir/test_expr.vim   2016-08-16 21:58:36.726878365 
+0200
--- src/testdir/test_expr.vim   2016-08-21 14:34:53.677549416 +0200
***
*** 237,242 
--- 237,243 
call assert_equal(1, OneByRef())
let OneByRef = funcref('One')
call assert_equal(2, OneByRef())
+   call assert_fails('echo funcref("{")', 'E475:')
  endfunc
  
  func Test_setmatches()
*** ../vim-7.4.2232/src/version.c   2016-08-20 19:22:13.412939701 +0200
--- src/version.c   2016-08-21 14:30:25.171950362 +0200
***
*** 765,766 
--- 765,768 
  {   /* Add new patch number below this line */
+ /**/
+ 2233,
  /**/

-- 
Everybody lies, but it doesn't matter since nobody listens.
-- Lieberman's Law

 /// 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: [bug] crash with funcref in vim-7.4.2232

2016-08-21 Fir de Conversatie Bram Moolenaar

Dominique wrote:

> afl-fuzz found this command which crashes vim-7.4.2232:
> 
>   $ vim -u NONE -c "echo funcref('{')"
>   Vim: Caught deadly signal SEGV
>   Vim: Finished.
>   Segmentation fault (core dumped)
> 
> In gdb:
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x004c1e26 in hash_hash (key=0x0) at hashtab.c:470
> 
> (gdb) bt
> #0  0x004c1e26 in hash_hash (key=0x0) at hashtab.c:470
> #1  0x004c164f in hash_find (ht=0x8ca240 ,
> key=0x0) at hashtab.c:120
> #2  0x005e284e in find_func (name=0x0) at userfunc.c:549
> #3  0x0044ee36 in common_function (argvars=0x7fffcea0,
> rettv=0x7fffd4b0, is_funcref=1) at evalfunc.c:3
> 735
> #4  0x0044ef0f in f_funcref (argvars=0x7fffcea0,
> rettv=0x7fffd4b0) at evalfunc.c:3766
> #5  0x00449fb2 in call_internal_func (name=0x929620 "funcref",
> argcount=1, argvars=0x7fffcea0, rettv=0x7ff
> fd4b0) at evalfunc.c:997
> #6  0x005e4702 in call_func (funcname=0x8e89b5
> "funcref('{')vim", len=7, rettv=0x7fffd4b0, argcount_in=1,
> argvars_in=0x7fffcea0, argv_func=0x0, firstline=1, lastline=1,
> doesrange=0x7fffd04c, evaluate=1, partial=0x0,
> selfdict_in=0x0) at userfunc.c:1372
> #7  0x005e2582 in get_func_tv (name=0x8e89b5
> "funcref('{')vim", len=7, rettv=0x7fffd4b0, arg=0x7fffd49
> 8, firstline=1, lastline=1, doesrange=0x7fffd04c, evaluate=1,
> partial=0x0, selfdict=0x0) at userfunc.c:455
> #8  0x0043f7d6 in eval7 (arg=0x7fffd498,
> rettv=0x7fffd4b0, evaluate=1, want_string=0) at eval.c:4343
> #9  0x0043f011 in eval6 (arg=0x7fffd498,
> rettv=0x7fffd4b0, evaluate=1, want_string=0) at eval.c:3977
> #10 0x0043eaf4 in eval5 (arg=0x7fffd498,
> rettv=0x7fffd4b0, evaluate=1) at eval.c:3793
> #11 0x0043ddb8 in eval4 (arg=0x7fffd498,
> rettv=0x7fffd4b0, evaluate=1) at eval.c:3492
> #12 0x0043dbf6 in eval3 (arg=0x7fffd498,
> rettv=0x7fffd4b0, evaluate=1) at eval.c:3409
> #13 0x0043da6f in eval2 (arg=0x7fffd498,
> rettv=0x7fffd4b0, evaluate=1) at eval.c:3341
> #14 0x0043d8a6 in eval1 (arg=0x7fffd498,
> rettv=0x7fffd4b0, evaluate=1) at eval.c:3269
> #15 0x00446086 in ex_echo (eap=0x7fffd5f0) at eval.c:8178
> #16 0x0047aa70 in do_one_cmd (cmdlinep=0x7fffd710,
> sourcing=1, cstack=0x7fffd800, fgetline=0x0, cookie
> =0x0) at ex_docmd.c:2925
> #17 0x0047775c in do_cmdline (cmdline=0x7fffe252 "echo
> funcref('{')vim", fgetline=0x0, cookie=0x0, flags=1
> 1) at ex_docmd.c:1110
> #18 0x00476d98 in do_cmdline_cmd (cmd=0x7fffe252 "echo
> funcref('{')vim") at ex_docmd.c:715
> #19 0x006236e1 in exe_commands (parmp=0x8cae40 ) at 
> main.c:2896
> #20 0x0062080e in vim_main2 () at main.c:781
> #21 0x0062010f in main (argc=9, argv=0x7fffde58) at main.c:415
> 
> (gdb) up
> #1  0x004c164f in hash_find (ht=0x8ca240 ,
> key=0x0) at hashtab.c:120
> (gdb) up
> #2  0x005e284e in find_func (name=0x0) at userfunc.c:549
> (gdb) up
> #3  0x0044ee36 in common_function (argvars=0x7fffcea0,
> rettv=0x7fffd4b0, is_funcref=1) at evalfunc.c:3735
> 
> evalfunc.c:
> 
>  3733│else if (is_funcref)
>  3734│{
>  3735├>  pt->pt_func = find_func(trans_name);
>  3736│func_ptr_ref(pt->pt_func);
>  3737│vim_free(name);
>  3738│}
> 
> (gdb) p trans_name
> $1 = (char_u *) 0x0
> 
> So we have a funcref with trans_name being NULL
> at evalfunc.c:3735. The current error checking looks
> complex in this function, so I'm not sure how to fix it.

Thanks for the report.  I think the best way is to check trans_name not
to be NULL quite early.  I'll make a patch.

-- 
Never overestimate a man's ability to underestimate a woman.

 /// 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: 100% CPU for a long time when editing .yml file

2016-08-21 Fir de Conversatie Armin Walland
> I can't reproduce it using vim-7.4.2232 (huge) on Linux.

VIM - Vi IMproved 7.4 (2013 Aug 10)
Included patches: 1-207, 209-326
Compiled by 'http://www.opensuse.org/'


> Which version of Vim are you using?  Make sure you're using
> a recent version, as the bug may have been fixed already.
> 
> Can you also try with:  vim -u NONE a.yaml?

how do i backspace when i start vim like his? :D


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

2016-08-21 Fir de Conversatie Marcin Szamotulski
On 05:38 Sun 21 Aug , John Marriott wrote:
> On 21-Aug-2016 02:37, Bram Moolenaar wrote:
> > Patch 7.4.2231
> > Problem:":oldfiles" output is a very long list.
> > Solution:   Add a pattern argument. (Coot, closes #575)
> > Files:  runtime/doc/starting.txt, src/ex_cmds.h, src/eval.c,
> >  src/ex_cmds.c, src/proto/eval.pro, src/proto/ex_cmds.pro,
> >  src/testdir/test_viminfo.vim
> >
> >
> After this patch I get the following warning (on mingw64) if 
> FEAT_QUICKFIX is not defined:
> gcc -c -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
> -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32
>   -DFEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer 
> -freg-struct-return -s ex_cmds.c -o gobjnative/ex_cmds.o
> ex_cmds.c: In function 'ex_oldfiles':
> ex_cmds.c:8415:10: warning: implicit declaration of function 
> 'skip_vimgrep_pat' [-Wimplicit-function-declaration]
>if (skip_vimgrep_pat(eap->arg, _pat, NULL) == NULL)
>^~~~
> ex_cmds.c:8415:53: warning: comparison between pointer and integer
>if (skip_vimgrep_pat(eap->arg, _pat, NULL) == NULL)
>   ^~
> 
> Followed by this linker error:
> gcc -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF 
> -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32 -D
> FEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer 
> -freg-struct-return -s -Wl,-nxcompat,-dynamicbase -mwindows -o gvim.exe 
> gobjnative/arabic.o gobjnative/blowfish.o gobjnative/buffer.o 
> gobjnative/charset.o gobjnative/crypt.o gobjnative/crypt_zip.o 
> gobjnative/dict.o gobjnative/diff.o gobjnative/digraph.o 
> gobjnative/edit.o gobjnative/eval.o gobjnative/evalfunc.o 
> gobjnative/ex_cmds.o gobjnative/ex_cmds2.o gobjnative/ex_docmd.o 
> gobjnative/ex_eval.o gobjnative/ex_getln.o gobjnative/farsi.o 
> gobjnative/fileio.o gobjnative/fold.o gobjnative/getchar.o 
> gobjnative/hardcopy.o gobjnative/hashtab.o gobjnative/json.o 
> gobjnative/list.o gobjnative/main.o gobjnative/mark.o 
> gobjnative/memfile.o gobjnative/memline.o gobjnative/menu.o 
> gobjnative/message.o gobjnative/misc1.o gobjnative/misc2.o 
> gobjnative/move.o gobjnative/mbyte.o gobjnative/normal.o 
> gobjnative/ops.o gobjnative/option.o gobjnative/os_win32.o 
> gobjnative/os_mswin.o gobjnative/winclip.o gobjnative/pathdef.o 
> gobjnative/popupmnu.o gobjnative/quickfix.o gobjnative/regexp.o 
> gobjnative/screen.o gobjnative/search.o gobjnative/sha256.o 
> gobjnative/spell.o gobjnative/spellfile.o gobjnative/syntax.o 
> gobjnative/tag.o gobjnative/term.o gobjnative/ui.o gobjnative/undo.o 
> gobjnative/userfunc.o gobjnative/version.o gobjnative/vimrc.o 
> gobjnative/window.o gobjnative/gui.o gobjnative/gui_w32.o 
> gobjnative/gui_beval.o gobjnative/os_w32exe.o -lkernel32 -luser32 
> -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lversion -lole32 -luuid
> gobjnative/ex_cmds.o:ex_cmds.c:(.text+0xb229): undefined reference to 
> `skip_vimgrep_pat'
> collect2.exe: error: ld returned 1 exit status
> Make_cyg_ming.mak:829: recipe for target 'gvim.exe' failed
> make: *** [gvim.exe] Error 1
> 
> skip_vimgrep_pat() is defined in quickfix.c, but the contents are only 
> included if FEAT_QUICKFIX or PROTO is defined.
> 
> Cheers
> John

The attached patch fixes that.

Cheers,
Marcin

-- 
-- 
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/quickfix.c b/src/quickfix.c
index 2fa6ed9..d3def61 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -4317,6 +4317,7 @@ theend:
 vim_free(target_dir);
 vim_regfree(regmatch.regprog);
 }
+#endif
 
 /*
  * Skip over the pattern argument of ":vimgrep /pat/[g][j]".
@@ -4370,6 +4371,7 @@ skip_vimgrep_pat(char_u *p, char_u **s, int *flags)
 return p;
 }
 
+#if defined(FEAT_QUICKFIX) || defined(PROTO)
 /*
  * Restore current working directory to "dirname_start" if they differ, taking
  * into account whether it is set locally or globally.


signature.asc
Description: Digital signature


Re: Scant GTK3 documentation

2016-08-21 Fir de Conversatie Kazunobu Kuriyama
2016-08-11 20:12 GMT+09:00 Tony Mechelynck :

> On Thu, Aug 11, 2016 at 10:01 AM, Kazunobu Kuriyama
>  wrote:
> > Hi Tony,
> >
> > Thank you for all those checks!
>
> Thank _you_ for the explanations, they're a great help to my
> understanding of the new GUI.
> >
> > 2016-08-11 12:23 GMT+09:00 Tony Mechelynck  >:
> >>
> >> - GTK3 is supported, it is said, but there aren't a lot of details about
> >> it
> >> - It is only barely mentioned under ":help GTK3" in doc/gui_x11.txt
> >> - It is mentioned here and there in version8.txt, once at lines 137
> >> and 139, long below ":help new-8" and shortly before ":help
> >> new-vim-script-8", then here and there starting at patch 7.4.1402
> >> - It is nowhere mentioned in the possible configuration settings in
> >> the src/Makefile
> >
> >
> > All those, I'll see to it later.
> >
> >>
> >> - Contrary to what "configure -h" seems to imply, AFAICT the only way
> >> to build with GTK3 is to require it explicitly by --enable-gui=gtk3
> >
> >
> > That's because, when the GTK3 patch was included, there was an agreement
> (or
> > no objection, more precisely) that, when both gtk2 and gtk3 are
> available,
> > the GTK2 GUI shall be selected as default.
>
> Ah, OK
> >
> > Since I didn't think the current output of 'configure -h' caused a
> > confusion, I have little idea as to what caused that.  Do you have an
> > suggestion how we could improve that?
>
> I have no _coding_ suggestions. As a _documentation_ suggestion, maybe
> mention in more detail the priority of GUIs (when more than one are
> available for building) in the Makefile comments about CONF_OPT_GUI
> and in the "configure -h" text
> >
> >>
> >> - When both GTK2 and GTK3 are present in the system,
> >> disable-gtk2-check --enable-gtk3-check builds a Vim with no GUI
> >
> >
> > Oh, I didn't try those combination.  I'd rather like to know why those
> > --(enable|disable)-*-check options were introduced.  It looks
> --enable-gui=
> > is enough...  For the sake of completeness of the autodetection
> mechanism,
> > maybe?
> >
> >>
> >> - In the same configuration, just «export
> >> CONF_OPT_GUI='enable-gnome-check'» (without the French quotes) gives a
> >> GTK2 GUI; GTK3 is not looked for.
> >> - When --enable-gui=gtk3 is present, then AFAICT --enable-gnome-check
> >> has no effect. (Maybe I don't have the right packages installed.)
> >
> >
> > Please note that the GTK3 GUI is completely independent of the Gnome 2
> > stuff.  This is because that stuff has been deprecated since the very
> early
> > version of Gnome 3 was released and was once said it would soon go away,
> I
> > intentionally wrote the patch in such a way that the GUI doesn't rely on
> > that.
> >
> > Accordingly, the both cases look fine to me: If --enable-gnome-check is
> > selected, it's natural for us to conclude that the user wants the GTK2
> GUI,
> > and if --enable-gui=3 is selected, the user don't want the Gnome stuff.
> >
> > Still, if you find there's room for improvement, please let me know.
>
> Here too, I would suggest "documentation improvements": let's say,
> mention that the Gnome interface to Vim is removed starting with GTK3,
> in the "build documentation" in src/Makefile and configure -h as
> above, and maybe also somewhere under "help GNOME" in the ordinary Vim
> help.
>

Hi Tony,

Thank you for the helpful suggestions.  Based on them, I made a patch to
improve the documentation, which is attached to this mail.

One thing I could not fulfill was to improve the output of 'configure -h'.

Instead, I made gui_x11.txt, in particular the section gui-x11-compiling,
up to date so that users can refer to that in case they are confused with
the output of 'configure -h'.

Hopefully, that could be a good compensation for my unfulfilled job :)


Hi Bram,

Please note that the patch contains changes in src/Makefile which are
usually not considered as part of a runtime update.  If you find it
appropriate to separate the changes from runtime ones, please let me know.
I'll see to it.


Best regards,
Kazunobu


>
> Best regards,
> Tony
>

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


x11_gtk_doc.patch
Description: Binary data


[patch] doc fixes

2016-08-21 Fir de Conversatie Dominique Pellé
Hi

Attached patch contains doc updates:
- typo corrections
- :help :search-args was misaligned with concealed text

Regards
Dominique

-- 
-- 
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/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt
index b8ab153..72a506f 100644
--- a/runtime/doc/tagsrch.txt
+++ b/runtime/doc/tagsrch.txt
@@ -454,9 +454,9 @@ The next file in the list is not used when:
 This also depends on whether case is ignored.  Case is ignored when:
 - 'tagcase' is "followic" and 'ignorecase' is set
 - 'tagcase' is "ignore"
-- 'tagcase' is "smart" and and the pattern only contains lower case
+- 'tagcase' is "smart" and the pattern only contains lower case
   characters.
-- 'tagcase' is "followscs" and 'smartcase' is set and and the pattern only
+- 'tagcase' is "followscs" and 'smartcase' is set and the pattern only
   contains lower case characters.
 If case is not ignored, and the tags file only has a match without matching
 case, the next tags file is searched for a match with matching case.  If no
@@ -833,24 +833,24 @@ CTRL-W d		Open a new window, with the cursor on the first
 
 *:search-args*
 Common arguments for the commands above:
-[!]   When included, find matches in lines that are recognized as comments.
-  When excluded, a match is ignored when the line is recognized as a
-  comment (according to 'comments'), or the match is in a C comment (after
-  "//" or inside /* */).  Note that a match may be missed if a line is
-  recognized as a comment, but the comment ends halfway the line.
-  And  if the line is a comment, but it is not recognized (according to
-  'comments') a match may be found in it anyway.  Example: >
+[!]	When included, find matches in lines that are recognized as comments.
+	When excluded, a match is ignored when the line is recognized as a
+	comment (according to 'comments'), or the match is in a C comment
+	(after "//" or inside /* */).  Note that a match may be missed if a
+	line is recognized as a comment, but the comment ends halfway the line.
+	And if the line is a comment, but it is not recognized (according to
+	'comments') a match may be found in it anyway.  Example: >
 		/* comment
 		   foobar */
-< A match for "foobar" is found, because this line is not recognized as a
-  comment (even though syntax highlighting does recognize it).
-  Note: Since a macro definition mostly doesn't look like a comment, the
-  [!] makes no difference for ":dlist", ":dsearch" and ":djump".
-[/]   A pattern can be surrounded by '/'.  Without '/' only whole words are
-  matched, using the pattern "\".  Only after the second '/' a
-  next command can be appended with '|'.  Example: >
+<	A match for "foobar" is found, because this line is not recognized as
+	a comment (even though syntax highlighting does recognize it).
+	Note: Since a macro definition mostly doesn't look like a comment, the
+	[!] makes no difference for ":dlist", ":dsearch" and ":djump".
+[/]	A pattern can be surrounded by '/'.  Without '/' only whole words are
+	matched, using the pattern "\".  Only after the second '/' a
+	next command can be appended with '|'.  Example: >
 	:isearch /string/ | echo "the last one"
-< For a ":djump", ":dsplit", ":dlist" and ":dsearch" command the pattern
-  is used as a literal string, not as a search pattern.
+<	For a ":djump", ":dsplit", ":dlist" and ":dsearch" command the pattern
+	is used as a literal string, not as a search pattern.
 
  vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/version8.txt b/runtime/doc/version8.txt
index 1be8b83..f97fff1 100644
--- a/runtime/doc/version8.txt
+++ b/runtime/doc/version8.txt
@@ -12884,7 +12884,7 @@ Files:  src/search.c, src/testdir/Make_all.mak, src/Makefile,
 src/testdir/test_gn.vim
 
 Patch 7.4.2101
-Problem:Looping over windows, buffers and tab pages is inconsistant.
+Problem:Looping over windows, buffers and tab pages is inconsistent.
 Solution:   Use FOR_ALL_ macros everywhere. (Yegappan Lakshmanan)
 Files:  src/buffer.c, src/diff.c, src/edit.c, src/eval.c, src/evalfunc.c,
 src/ex_cmds.c, src/ex_cmds2.c, src/ex_docmd.c, src/fileio.c,


debugging vim

2016-08-21 Fir de Conversatie carmel zuk
Hi all,
I'd like to debug vim with cgdb to understand how it works.

My problem is this:
when I run 
cgdb vim
I get the output in the cgdb console as binary.. I can't debug mouse actions or 
editing.

Is there a way to point vim to another terminal instance other than the cgdb?

or how would you suggest to go about this one?

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: 100% CPU for a long time when editing .yml file

2016-08-21 Fir de Conversatie Dominique Pellé
armin walland  wrote:

> hi!
>
> i think i have encountered a bug in vim's syntax plugin.
>
> the behaviour seems to have something to do with matching of curly braces or
> quotes.
>
> $ cat a.yml
>
> - name: make sure authorized_keys are correct
>   authorized_key: user=root key="{{ a-ssh }}"
>   authorized_key: user=root key="{{ b-ssh }}"
>   authorized_key: user=root state=absent
> key="f"
>
>
> if i open this file with vim, change to edit mode, place the cursor at the
> closing double quote in the b-ssh line and press backspace, vim freezes for
> some time (maybe 30 seconds) using 100% cpu and returns to life eventually.
> the duration of the freeze seems to be related to how long the
> "ff..." line is. :syntax off removes the problem.
>
> not sure how my thunderbird will format this message, but just to make sure,
> there should not be a newline before the key="f..." line.
>
> thank you :)

I can't reproduce it using vim-7.4.2232 (huge) on Linux.

Which version of Vim are you using?  Make sure you're using
a recent version, as the bug may have been fixed already.

Can you also try with:  vim -u NONE a.yaml?

Regards
Dominique

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