Issue 248 in vim: Using if_pyth: vim.error: Vim:E315: ml_get: invalid lnum: 2

2014-08-09 Fir de Conversatie vim

Status: New
Owner: 
Labels: Type-Defect Priority-Medium

New issue 248 by ktvoel...@gmail.com: Using if_pyth: vim.error: Vim:E315:  
ml_get: invalid lnum: 2

http://code.google.com/p/vim/issues/detail?id=248

What steps will reproduce the problem?

Run in the shell (in a directory with the attached files):
vim -u NONE

Run in vim:
:edit one
:edit three
:source bug.vim
:3
:source bug.vim


What is the expected output? What do you see instead?

Expected output is silence. Actual output is E315.


What version of the product are you using? On what operating system?

Vim 7.4 (details in bugreport.txt)

uname -a: Darwin Telltale.local 13.3.0 Darwin Kernel Version 13.3.0: Tue  
Jun  3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64


Attachments:
bugreport.txt  18.5 KB
one  3 bytes
three  13 bytes
bug.vim  46 bytes

--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
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: small sh.vim patch

2014-08-09 Fir de Conversatie Gary Johnson
On 2014-08-08, Charles E Campbell wrote:

 Thanks!  I've put an updated syntax/sh.vim onto my website:
 http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH.

I'm seeing some odd coloring of comments following 'set' commands.

In the following example, the comment retains the shSetList coloring
of 'ignoreeof', and because the text following the '#' is not
considered a comment, the single-quote begins a region of
shSingleQuote.

set -o ignoreeof# Don't let Ctrl-D exit the shell.

I took a stab at fixing the problem by terminating shSetList regions
with an additional end pattern:

end=\s#me=e-2

A patch is attached.

Caveat:  I don't really know what I'm doing when it comes to syntax
files or what the side-effects of this change might be.  It looked
like it might work and it did.

Regards,
Gary

-- 
-- 
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.
--- .vim/syntax/sh.vim	2014-08-08 18:27:36.0 -0700
+++ .vim/before/syntax/sh.vim	2014-08-08 23:36:04.455129746 -0700
@@ -411,13 +411,13 @@
 syn match  shSetIdentifier	=		contained	nextgroup=shCmdParenRegion,shPattern,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shSingleQuote,shExSingleQuote
 syn region shAtExpr	contained	start=@( end=) contains=@shIdList
 if exists(b:is_bash)
- syn region shSetList oneline matchgroup=shSet start=\\(declare\|typeset\|local\|export\|unset\)\\ze[^/] end=$	matchgroup=shSetListDelim end=\ze[}|);] matchgroup=NONE end=\ze\s\+#\|=	contains=@shIdList
- syn region shSetList oneline matchgroup=shSet start=\set\\ze[^/] end=\ze[;|)]\|$			matchgroup=shSetListDelim end=\ze[}|);] matchgroup=NONE end=\ze\s\+=	contains=@shIdList
+ syn region shSetList oneline matchgroup=shSet start=\\(declare\|typeset\|local\|export\|unset\)\\ze[^/] end=$ end=\s#me=e-2	matchgroup=shSetListDelim end=\ze[}|);] matchgroup=NONE end=\ze\s\+#\|=	contains=@shIdList
+ syn region shSetList oneline matchgroup=shSet start=\set\\ze[^/] end=\ze[;|)]\|$ end=\s#me=e-2		matchgroup=shSetListDelim end=\ze[}|);] matchgroup=NONE end=\ze\s\+=	contains=@shIdList
 elseif exists(b:is_kornshell)
- syn region shSetList oneline matchgroup=shSet start=\\(typeset\|export\|unset\)\\ze[^/] end=$		matchgroup=shSetListDelim end=\ze[}|);] matchgroup=NONE end=\ze\s\+[#=]	contains=@shIdList
- syn region shSetList oneline matchgroup=shSet start=\set\\ze[^/] end=$matchgroup=shSetListDelim end=\ze[}|);] matchgroup=NONE end=\ze\s\+[#=]	contains=@shIdList
+ syn region shSetList oneline matchgroup=shSet start=\\(typeset\|export\|unset\)\\ze[^/] end=$ end=\s#me=e-2	matchgroup=shSetListDelim end=\ze[}|);] matchgroup=NONE end=\ze\s\+[#=]	contains=@shIdList
+ syn region shSetList oneline matchgroup=shSet start=\set\\ze[^/] end=$ end=\s#me=e-2 			matchgroup=shSetListDelim end=\ze[}|);] matchgroup=NONE end=\ze\s\+[#=]	contains=@shIdList
 else
- syn region shSetList oneline matchgroup=shSet start=\\(set\|export\|unset\)\\ze[^/] end=$		matchgroup=shSetListDelim end=\ze[}|);] matchgroup=NONE end=\ze\s\+[#=]	contains=@shIdList
+ syn region shSetList oneline matchgroup=shSet start=\\(set\|export\|unset\)\\ze[^/] end=$ end=\s#me=e-2	matchgroup=shSetListDelim end=\ze[}|);] matchgroup=NONE end=\ze\s\+[#=]	contains=@shIdList
 endif
 
  Functions: {{{1


Add count to :close and :hide commands

2014-08-09 Fir de Conversatie Marcin Szamotulski
Hello,

I wrote a patch which adds [count] to :colse, :hide and ^Wc normal
command.  When given the window with window number [count] will be
closed/hidden.  Sometimes I want to close not the current window but
another one, this command let to do that without switching windows
without ^Ww normal command.

Best regards,
Marcin Szamotulski
diff -r 7090d7f160f7 -r 5f398504f605 runtime/doc/windows.txt
--- a/runtime/doc/windows.txt	Sat Jul 26 13:40:44 2014 +0200
+++ b/runtime/doc/windows.txt	Sat Aug 09 10:52:43 2014 +0100
@@ -279,12 +279,15 @@
 		the buffer are lost, even when 'hidden' is set.
 
 CTRL-W c	*CTRL-W_c* *:clo* *:close*
-:clo[se][!]	Close current window.  When the 'hidden' option is set, or
-		when the buffer was changed and the [!] is used, the buffer
-		becomes hidden (unless there is another window editing it).
-		When there is only one window in the current tab page and
-		there is another tab page, this closes the current tab page.
-		|tab-page|.
+:[count]clo[se][!]
+		Close current window if [count] is not given, otherwise close
+		window with window number equal to [count].  When the 'hidden'
+		option is set, or when the buffer was changed and the [!] is
+		used, the buffer becomes hidden (unless there is another
+		window editing it).  When there is only one window in the
+		current tab page and there is another tab page, this closes
+		the current tab page.  |tab-page|.  If [count] is greater than
+		the last window number the last window will be closed.
 		This command fails when:			*E444*
 		- There is only one window on the screen.
 		- When 'hidden' is not set, [!] is not used, the buffer has
@@ -298,11 +301,12 @@
 		command.
 
 			*:hide*
-:hid[e]		Quit current window, unless it is the last window on the
-		screen.  The buffer becomes hidden (unless there is another
-		window editing it or 'bufhidden' is unload or delete).
-		If the window is the last one in the current tab page the tab
-		page is closed. |tab-page|
+:[count]hid[e]	Quit current window, unless it is the last window on the
+		screen.  If [count] is given quit the window with window
+		number equal to [count].  The buffer becomes hidden (unless
+		there is another window editing it or 'bufhidden' is unload
+		or delete).  If the window is the last one in the current
+		tab page the tab page is closed. |tab-page|
 		The value of 'hidden' is irrelevant for this command.
 		Changes to the buffer are not written and won't get lost, so
 		this is a safe command.
diff -r 7090d7f160f7 -r 5f398504f605 src/ex_cmds.h
--- a/src/ex_cmds.h	Sat Jul 26 13:40:44 2014 +0200
+++ b/src/ex_cmds.h	Sat Aug 09 10:52:43 2014 +0100
@@ -232,7 +232,7 @@
 EX(CMD_clast,		clast,	ex_cc,
 			RANGE|NOTADR|COUNT|TRLBAR|BANG),
 EX(CMD_close,		close,	ex_close,
-			BANG|TRLBAR|CMDWIN),
+			BANG|RANGE|NOTADR|COUNT|TRLBAR|CMDWIN),
 EX(CMD_cmap,		cmap,		ex_map,
 			EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
 EX(CMD_cmapclear,	cmapclear,	ex_mapclear,
@@ -428,7 +428,7 @@
 EX(CMD_highlight,	highlight,	ex_highlight,
 			BANG|EXTRA|TRLBAR|SBOXOK|CMDWIN),
 EX(CMD_hide,		hide,		ex_hide,
-			BANG|EXTRA|NOTRLCOM),
+			BANG|RANGE|NOTADR|COUNT|EXTRA|NOTRLCOM),
 EX(CMD_history,		history,	ex_history,
 			EXTRA|TRLBAR|CMDWIN),
 EX(CMD_insert,		insert,	ex_append,
diff -r 7090d7f160f7 -r 5f398504f605 src/ex_docmd.c
--- a/src/ex_docmd.c	Sat Jul 26 13:40:44 2014 +0200
+++ b/src/ex_docmd.c	Sat Aug 09 10:52:43 2014 +0100
@@ -6657,6 +6657,8 @@
 ex_close(eap)
 exarg_T	*eap;
 {
+win_T	*win;
+int		winnr = 0;
 # ifdef FEAT_CMDWIN
 if (cmdwin_type != 0)
 	cmdwin_result = Ctrl_C;
@@ -6667,7 +6669,21 @@
 		 !curbuf_locked()
 #endif
 		)
-	ex_win_close(eap-forceit, curwin, NULL);
+	{
+	if (eap-addr_count == 0)
+		ex_win_close(eap-forceit, curwin, NULL);
+	else {
+		for (win = firstwin; win != NULL; win = win-w_next)
+		{
+		winnr++;
+		if (winnr == eap-line2)
+			break;
+		}
+		if (win == NULL)
+		win = lastwin;
+		ex_win_close(eap-forceit, win, NULL);
+	}
+	}
 }
 
 # ifdef FEAT_QUICKFIX
@@ -6895,6 +6911,9 @@
 ex_hide(eap)
 exarg_T	*eap;
 {
+win_T	*win;
+int		winnr = 0;
+
 if (*eap-arg != NUL  check_nextcmd(eap-arg) == NULL)
 	eap-errmsg = e_invarg;
 else
@@ -6907,7 +6926,18 @@
 # ifdef FEAT_GUI
 	need_mouse_correct = TRUE;
 # endif
-	win_close(curwin, FALSE);	/* don't free buffer */
+	if (eap-addr_count == 0)
+		win_close(curwin, FALSE);	/* don't free buffer */
+	else {
+		for(win = firstwin; win != NULL; win-w_next) {
+		winnr++;
+		if (winnr == eap-line2)
+			break;
+		}
+		if (win == NULL)
+		win = lastwin;
+		win_close(win, FALSE);
+	}
 	}
 #endif
 }
diff -r 7090d7f160f7 -r 5f398504f605 src/window.c
--- a/src/window.c	Sat Jul 26 13:40:44 2014 +0200
+++ b/src/window.c	Sat Aug 09 10:52:43 2014 +0100
@@ -206,7 +206,11 @@
 case Ctrl_C:
 case 'c':
 		reset_VIsual_and_resel();	/* stop Visual mode */
-		do_cmdline_cmd((char_u *)close);
+		STRCPY(cbuf, close);
+		if (Prenum)
+		  

Re: Add count to :close and :hide commands

2014-08-09 Fir de Conversatie Bram Moolenaar

Marcin Szamotulski wrote:

 I wrote a patch which adds [count] to :colse, :hide and ^Wc normal
 command.  When given the window with window number [count] will be
 closed/hidden.  Sometimes I want to close not the current window but
 another one, this command let to do that without switching windows
 without ^Ww normal command.

Nice idea.  I would find :1close and :9close the most useful,
closing the first and last window.  Looks like the code does take the
last window when the count is more than the number of windows.  This
isn't obvious in the documentation, adding these two as an example will
make them found quicker.  And perhaps :hide docs should refer to the
explanation of [count] in :close.

How about a test?


-- 
hundred-and-one symptoms of being an internet addict:
9. All your daydreaming is preoccupied with getting a faster connection to the
   net: 28.8...ISDN...cable modem...T1...T3.

 /// 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: Issue 231 in vim: netrw silently closing buffers on its own

2014-08-09 Fir de Conversatie vim


Comment #10 on issue 231 by johnston...@gmail.com: netrw silently closing  
buffers on its own

http://code.google.com/p/vim/issues/detail?id=231

Any news? Were you able to recreate the issue?

--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
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] Fix folds sometimes not opening after selecting a search from command line window

2014-08-09 Fir de Conversatie Jacob Niehus
Having search set in the 'foldopen' option should cause folds to open to show 
a search result after selecting a previous search from the search command line 
history. This works as expected except when there are any CmdwinLeave 
autocommands. In that case, 'KeyTyped' gets reset by the autocommand execution 
and causes the fold not to open. This patch fixes that issue.

-Jake

diff --git a/src/ex_getln.c b/src/ex_getln.c
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -6363,6 +6363,10 @@
 #ifdef FEAT_RIGHTLEFT
 intsave_cmdmsg_rl = cmdmsg_rl;
 #endif
+#ifdef FEAT_FOLDING
+intsave_KeyTyped;
+#endif
+
 
 /* Can't do this recursively.  Can't do it when typing a password. */
 if (cmdwin_type != 0
@@ -6497,8 +6501,19 @@
 RedrawingDisabled = i;
 
 # ifdef FEAT_AUTOCMD
+
+# ifdef FEAT_FOLDING
+save_KeyTyped = KeyTyped;
+# endif
+
 /* Trigger CmdwinLeave autocommands. */
 apply_autocmds(EVENT_CMDWINLEAVE, typestr, typestr, FALSE, curbuf);
+
+# ifdef FEAT_FOLDING
+/* Restore KeyTyped in case it is modified by autocommands */
+KeyTyped = save_KeyTyped;
+# endif
+
 # endif
 
 /* Restore the command line info. */

-- 
-- 
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_getln.c b/src/ex_getln.c
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -6363,6 +6363,10 @@
 #ifdef FEAT_RIGHTLEFT
 int			save_cmdmsg_rl = cmdmsg_rl;
 #endif
+#ifdef FEAT_FOLDING
+int			save_KeyTyped;
+#endif
+
 
 /* Can't do this recursively.  Can't do it when typing a password. */
 if (cmdwin_type != 0
@@ -6497,8 +6501,19 @@
 RedrawingDisabled = i;
 
 # ifdef FEAT_AUTOCMD
+
+# ifdef FEAT_FOLDING
+save_KeyTyped = KeyTyped;
+# endif
+
 /* Trigger CmdwinLeave autocommands. */
 apply_autocmds(EVENT_CMDWINLEAVE, typestr, typestr, FALSE, curbuf);
+
+# ifdef FEAT_FOLDING
+/* Restore KeyTyped in case it is modified by autocommands */
+KeyTyped = save_KeyTyped;
+# endif
+
 # endif
 
 /* Restore the command line info. */


Re: Issue 231 in vim: netrw silently closing buffers on its own

2014-08-09 Fir de Conversatie vim

Updates:
Status: Accepted

Comment #11 on issue 231 by drc...@campbellfamily.biz: netrw silently  
closing buffers on its own

http://code.google.com/p/vim/issues/detail?id=231

I've been able to duplicate the problem, so its now on my todo list.

--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
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: small sh.vim patch

2014-08-09 Fir de Conversatie Charles E Campbell

Gary Johnson wrote:

set -o ignoreeof# Don't let Ctrl-D exit the shell.

Hello, Gary:

Are you actually using the old Bourne shell?   This problem does not 
appear when using the Korn/Posix shell or the Bash shell.  Try reading a 
bit of :help sh.vim .


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] doc fixes

2014-08-09 Fir de Conversatie Dominique Pellé
Hi

Attached patch fixes several typos in Vim help files.

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 -r 913d16b4904c runtime/doc/eval.txt
--- a/runtime/doc/eval.txt	Thu Aug 07 13:55:10 2014 +0200
+++ b/runtime/doc/eval.txt	Sat Aug 09 23:19:26 2014 +0200
@@ -2621,7 +2621,7 @@
 		line.
 		If {col} is zero, the cursor will stay in the current column.
 		If {curswant} is given it is used to set the preferred column
-		for vertical movment.  Otherwise {col} is used.
+		for vertical movement.  Otherwise {col} is used.
 		When 'virtualedit' is used {off} specifies the offset in
 		screen columns from the start of the character.  E.g., a
 		position within a Tab or after the last character.
@@ -5484,7 +5484,7 @@
 		Returns zero for success, non-zero for failure.
 
 			*E883*
-		Note: you may not use |List| containing more then one item to 
+		Note: you may not use |List| containing more than one item to 
 		  set search and expression registers. Lists containing no 
 		  items act like empty strings.
 
@@ -5634,7 +5634,7 @@
 		after Strings, |Lists| after Numbers.  For sorting text in the
 		current buffer use |:sort|.
 
-		When {func} is given and it is is '1' or 'i' then case is
+		When {func} is given and it is '1' or 'i' then case is
 		ignored.
 		
 		When {func} is given and it is 'n' then all items will be
diff -r 913d16b4904c runtime/doc/os_vms.txt
--- a/runtime/doc/os_vms.txt	Thu Aug 07 13:55:10 2014 +0200
+++ b/runtime/doc/os_vms.txt	Sat Aug 09 23:19:26 2014 +0200
@@ -774,7 +774,7 @@
 - correct RealWaitForChar 
 - after 7.4-119 use different functions lib$cvtf_to_internal_time because Alpha and VAX have
   G_FLOAT but IA64 uses IEEE float otherwise Vim crashes
-- guard agains crashes that are caused by mixed filenames
+- guard against crashes that are caused by mixed filenames
 - [TESTDIR]make_vms.mms changed to see the output files
 - Improve tests, update known issues
 - minor compiler warnings fixed
diff -r 913d16b4904c runtime/doc/os_win32.txt
--- a/runtime/doc/os_win32.txt	Thu Aug 07 13:55:10 2014 +0200
+++ b/runtime/doc/os_win32.txt	Sat Aug 09 23:19:26 2014 +0200
@@ -334,7 +334,7 @@
 :!start /min ctags -R .
   When it has finished you should see file named tags in your current
directory.  You should notice the window title blinking on your taskbar.
-   This is more noticable for commands that take longer.
+   This is more noticeable for commands that take longer.
Now delete the tags file and run this command: 
 :!start /b ctags -R .
   You should have the same tags file, but this time there will be no
diff -r 913d16b4904c runtime/doc/syntax.txt
--- a/runtime/doc/syntax.txt	Thu Aug 07 13:55:10 2014 +0200
+++ b/runtime/doc/syntax.txt	Sat Aug 09 23:19:26 2014 +0200
@@ -501,7 +501,7 @@
 takes the form of L123 for single-buffer HTML pages, or W2L123 for diff-view
 pages, and is used to jump to a specific line (in a specific window of a diff
 view). Javascript is inserted to open any closed dynamic folds
-(|g:html_dynamic_folds|) containing the specificed line before jumping. The
+(|g:html_dynamic_folds|) containing the specified line before jumping. The
 javascript also allows omitting the window ID in the url, and the leading L.
 For example: 
 
diff -r 913d16b4904c runtime/doc/todo.txt
--- a/runtime/doc/todo.txt	Thu Aug 07 13:55:10 2014 +0200
+++ b/runtime/doc/todo.txt	Sat Aug 09 23:19:26 2014 +0200
@@ -82,7 +82,7 @@
 When using an undo file, also restore the changelist, so that g; works.
 
 Value returned by virtcol() changes depending on how lines wrap.  This is
-inconsistant with the documentation.
+inconsistent with the documentation.
 
 MS-Windows: Crash opening very long file name starting with \\.
 (Christian Brock, 2012 Jun 29)
@@ -125,7 +125,7 @@
 
 Idea: For a window in the middle (has window above and below it), use
 right-mouse-drag on the status line to move a window up/down without changing
-it's height?  It's like dragging the status bar above it at the same time.
+its height?  It's like dragging the status bar above it at the same time.
 
 Can we make :unlet $VAR use unsetenv() to delete the env var?
 What for systems that don't have unsetenv()?
@@ -210,7 +210,7 @@
 Patch for XDG base directory support. (Jean François Bignolles, 2014 Mar 4)
 Remark on the docs.  Should not be a compile time feature.  But then what?
 
-Completion of :e is :earlier, whould be :edit.  Complete to the matching
+Completion of :e is :earlier, should be :edit.  Complete to the matching
 command instead of doing this alphabetically. 

Re: [patch] Fix characters from completion suggestion remaining in line

2014-08-09 Fir de Conversatie Jacob Niehus
On Wednesday, July 16, 2014 9:18:53 AM UTC-7, Bram Moolenaar wrote:
 Jacob Niehus wrote:
 
 
 
  I agree with all of that in principle, but I've been able to reliably
 
  compile and with and without the screen_start() and see the problem go
 
  away with screen_start() there. Unfortunately I don't know why it
 
  works, so I can't really defend my suggestion.
 
  
 
  Forcing a redraw with update_screen(CLEAR) does work, but anything
 
  below that (NOT_VALID etc.) didn't work. It's not the best solution,
 
  but I can't find the cause of the problem after lots of digging
 
  through the code.
 
 
 
 Hmm, if CLEAR is necessary this indicates an external program is messing
 
 up the screen.  Or there is a weird bug in Vim.  For normal redrawing
 
 NOT_VALID should be sufficient.
 
 
 
 -- 
 
 Why is abbreviation such a long word?
 
 
 
  /// 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///

Bram,

I made a big discovery on this today. I can reproduce the problem very reliably 
now. The issue occurs rarely when the system() command is called in insert 
mode, e.g. in an InsertCharPre autocommand. I can reproduce the problem by 
intentionally calling system() a bunch of times while typing in insert mode.

If you run Vim with -u NONE -i NONE -S sys_ins.vim and then type in insert 
mode at a moderate pace (typing a single letter at a time doesn't seem to ever 
cause the problem), the same letter will be inserted multiple times for a 
single keypress and the displayed characters persist after exiting insert mode 
until a complete redraw. The cursor can't be moved onto the anomalous 
characters.

Let me know if you can reproduce the problem this way. I looked into the code 
for inserting characters a bit, and the insert_char()/insert_char_bytes() are 
only being called once per keypress, so I don't know how to proceed with 
tracking down the problem.

Thanks,
Jake

 sys_ins.vim:
set nocp
function! DoSystem()
for n in range(1,20)
call system('ls')
endfor
endfunction
autocmd InsertCharPre * call DoSystem()

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


sys_ins.vim
Description: Binary data


Re: small sh.vim patch

2014-08-09 Fir de Conversatie Gary Johnson
On 2014-08-09, Charles E Campbell wrote:
 Gary Johnson wrote:
 set -o ignoreeof# Don't let Ctrl-D exit the shell.
 Hello, Gary:
 
 Are you actually using the old Bourne shell?   This problem does not
 appear when using the Korn/Posix shell or the Bash shell.  Try
 reading a bit of :help sh.vim .

No, I'm using bash and I have

let g:is_bash = 1

in my .vimrc.

I just tried another experiment to try to eliminate the influence of
non-standard files.  I executed the following.

$ vim -N -u NONE -i NONE -c 'let g:is_bash=1' -c 'syntax on' ignoreeof.sh

where ignoreeof.sh contains only the line shown above.

Here is the output of :scriptnames.

  1: /usr/local/share/vim/vim74/syntax/syntax.vim
  2: /usr/local/share/vim/vim74/syntax/synload.vim
  3: /usr/local/share/vim/vim74/syntax/syncolor.vim
  4: ~/Dropbox/vimfiles/filetype.vim
  5: /usr/local/share/vim/vim74/filetype.vim
  6: ~/Dropbox/vimfiles/ftdetect/csv.vim
  7: ~/Dropbox/vimfiles/ftdetect/mediawiki.vim
  8: ~/Dropbox/vimfiles/syntax/sh.vim
  9: /usr/local/share/vim/vim74/syntax/sh.vim

The syntax/sh.vim file is the one I just downloaded from your site,
version 138, Aug 08, 2014.

That one line is highlighted as I described previously and as
illustrated below.

set -o ignoreeof# Don't let Ctrl-D exit the shell.
--- -- -- 
|   |  ||- |
|   |  cyan shShellList || red shSingleQuote
|   |   ||
|   violet shSetOption  |yellow shQuote
|   |
yellow shSetcyan shShellList

It should instead be that the # and everything to the right is
highlighted blue shComment.

Regards,
Gary

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