Christian Brabandt | 24 Oct 11:15 2014

[patch] Problem with syntax highlighting and "skipwhite"

Bram,

a popular questions at Stackoverflow covers the topic how to display
whitespace distinct so that it is easily visible where whitespace is.
Since starting with Vim 7.3 Concealing became available, my answer to
that problem was this:

,----
| syn match WhiteSpace / / containedin=ALL conceal cchar=·
| setl conceallevel=2 concealcursor=nv
`----

That should theoretically match everywhere, but I noticed it doesn't. I
have digged into the syntax highlighting rules and apparently, this is
caused by the "skipwhite" argument in the syntax files. The help however
states this:

,----[ :h syn-skipwhite ]-
| When "skipwhite" is present, the white space is only skipped if there
| is no next group that matches the white space.
`----

So I would argue, that a syntax rule, that has the containedin argument,
should also apply at that space. The patch seems relativly simple:

diff --git a/src/syntax.c b/src/syntax.c
--- a/src/syntax.c
+++ b/src/syntax.c
 <at>  <at>  -2275,12 +2275,14  <at>  <at>  syn_current_attr(syncing, displaying, ca
              * If a nextgroup was not found, continue looking for one 
(Continue reading)

Dominique Pellé | 23 Oct 23:11 2014
Picon

[bug] incorrect syntax highlighting

Hi

I notice incorrect syntax highlighting in c or c++
with vim-7.4.488 when typing:

#define FOO0BAR

To reproduce,  type...

$ vim -u NONE \
   -c 'setfiletype c' \
   -c 'syntax on' \
   -c "call feedkeys('i#define FOO0BAR')"

... and notice that FOO0BAR is highlighted in 2 colors:
* FOO has syntax group cDefine
* 0BAR has syntax group cCppOut2

Vim-7.4 was highlighting correctly.
The regression was introduced in this
changeset which modified c.vim:

changeset:   6259:bd18da914be9
user:        Bram Moolenaar <bram <at> vim.org>
date:        Thu Oct 02 01:41:41 2014 +0200
files:       runtime/autoload/phpcomplete.vim runtime/compiler/msvc.vim runtime/doc/autocmd.txt runtime/doc/editing.txt runtime/doc/eval.txt runtime/doc/map.txt runtime/doc/netbeans.txt runtime/doc/options.txt runtime/doc/os_win32.txt runtime/doc/syntax.txt runtime/doc/tags runtime/doc/todo.txt runtime/doc/version7.txt runtime/doc/windows.txt runtime/syntax/c.vim runtime/syntax/valgrind.vim
description:
Update runtime 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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
quivil | 23 Oct 12:36 2014
Picon

Vim wrong syntax highlighting in Groovy in vim 7.4

Vim 7.4 syntax highlighting for Groovy treats slash '/' as beginning of regular expression in groovy,
which is all cool unless you try to divide two things (like val3 = val1 / val2), which results in the
following rest of code looking as if it was a string literal or comment.

More details + workaround are posted there
http://stackoverflow.com/questions/26518938/vim-wrong-syntax-highlighting-in-groovy

But it took me a while to figure it out and it'd be great if next version of vim had this bug automatically
solved (and yup I'm aware that there seems to be a conflict if we want to have regexps like /this/ and
dividing symbol '/' at the same time, but I believe it can be somehow reasonably figured out :) ).

-- 
--

-- 
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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

vim | 22 Oct 22:18 2014

Issue 274 in vim: hangs with very long lines

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

New issue 274 by matteosi... <at> gmail.com: hangs with very long lines
https://code.google.com/p/vim/issues/detail?id=274

What steps will reproduce the problem?
1. open a file that have some very long line
2. move up and/orw down through the file with the arrow keys and other  
methods (such as jump to the beginning, end or file or to a substring that  
matches a search)
3. move up and or down with the arrow keys through some part of the files  
where there are very long lines

What is the expected output?

Nothing special should happen. Navigating could be awkward because of the  
fact that the whole line doesn't even fit within the terminal, but it  
should never become slow in responding to keyword or mouse interaction

What do you see instead?

vim hanged, started consuming 100% cpu and stopped responding. After  
several minutes I had to kill it.

This is extremely critical as it may imply data loss.

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

Ubuntu 14.04

Please provide any additional information below.

-- 
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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bram Moolenaar | 22 Oct 22:09 2014
Picon
Picon

Patch 7.4.488


Patch 7.4.488
Problem:    test_mapping fails for some people.
Solution:   Set the 'encoding' option. (Ken Takata)
Files:	    src/testdir/test_mapping.in

*** ../vim-7.4.487/src/testdir/test_mapping.in	2014-10-21 16:22:01.407175226 +0200
--- src/testdir/test_mapping.in	2014-10-22 22:04:48.422492595 +0200
***************
*** 3,8 ****
--- 3,9 ----
  STARTTEST
  :so small.vim
  :so mbyte.vim
+ :set encoding=utf-8
  : " abbreviations with р (0x80) should work
  :inoreab чкпр   vim
  GAчкпр 
*** ../vim-7.4.487/src/version.c	2014-10-21 20:57:11.538295006 +0200
--- src/version.c	2014-10-22 22:05:33.758492694 +0200
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     488,
  /**/

-- 
You had connectors?  Eeee, when I were a lad we 'ad to carry the
bits between the computer and the terminal with a spoon...

 /// Bram Moolenaar -- Bram <at> 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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andi Hafner | 22 Oct 18:06 2014
Picon

Suggestion: adding commands for adjusting the window width in the quickref help

Hi there.

I'm not sure if I'm right here as I'm not familiar with google groups in 
general and therefore with this mailing list and how it's organized.

So I followed the instructions on http://www.vim.org/develop.php and 
send the proposed addition as diff file for approval.

IMHO, even it's a quick reference it would be consistent also to mention 
the commands for adjusting the window width and not only the ones for 
adjusting their height.

Doing so, I also realized that there is no built in horizontal 
equivalent to CTRL-W_= (make all windows equal height), i.e. a command 
to make all windows equal width. Am I right or did I miss something? 
(I'm speaking about internal commands, not about extensions, scripts 
etc. I'm also aware about :set winfixwidth.)

However it may be, thanks to all for the greatest editing language ever 
seen and happy hacking ;-)

-- 
-- 
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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
 <at>  <at>  -1318,6 +1318,11  <at>  <at> 
 |CTRL-W_+|	CTRL-W +		increase current window height
 |CTRL-W__|	CTRL-W _		set current window height (default:
 					   very high)
+
+|CTRL-W_<|	CTRL-W <		decrease current window width
+|CTRL-W_>|	CTRL-W >		increase current window width
+|CTRL-W_bar|	CTRL-W |		set current window width (default:
+					   widest possible)
 ------------------------------------------------------------------------------
 *Q_bu*		Buffer list commands

Bram Moolenaar | 21 Oct 20:57 2014
Picon
Picon

Patch 7.4.487


Patch 7.4.487
Problem:    ":sign jump" may use another window even though the file is
	    already edited in the current window.
Solution:   First check if the file is in the current window. (James McCoy)
Files:	    src/window.c, src/testdir/Make_amiga.mak,
	    src/testdir/Make_dos.mak, src/testdir/Make_ming.mak,
	    src/testdir/Make_os2.mak, src/testdir/Make_vms.mms,
	    src/testdir/Makefile, src/testdir/test_signs.in,
	    src/testdir/test_signs.ok

*** ../vim-7.4.486/src/window.c	2014-10-09 10:44:33.196866267 +0200
--- src/window.c	2014-10-21 20:50:13.018294092 +0200
***************
*** 4407,4426 ****
  buf_jump_open_win(buf)
      buf_T	*buf;
  {
! # ifdef FEAT_WINDOWS
!     win_T	*wp;

!     for (wp = firstwin; wp != NULL; wp = wp->w_next)
! 	if (wp->w_buffer == buf)
! 	    break;
      if (wp != NULL)
  	win_enter(wp, FALSE);
-     return wp;
- # else
-     if (curwin->w_buffer == buf)
- 	return curwin;
-     return NULL;
  # endif
  }

  /*
--- 4407,4425 ----
  buf_jump_open_win(buf)
      buf_T	*buf;
  {
!     win_T	*wp = NULL;

!     if (curwin->w_buffer == buf)
! 	wp = curwin;
! # ifdef FEAT_WINDOWS
!     else
! 	for (wp = firstwin; wp != NULL; wp = wp->w_next)
! 	    if (wp->w_buffer == buf)
! 		break;
      if (wp != NULL)
  	win_enter(wp, FALSE);
  # endif
+     return wp;
  }

  /*
***************
*** 4432,4443 ****
  buf_jump_open_tab(buf)
      buf_T	*buf;
  {
  # ifdef FEAT_WINDOWS
-     win_T	*wp;
      tabpage_T	*tp;

-     /* First try the current tab page. */
-     wp = buf_jump_open_win(buf);
      if (wp != NULL)
  	return wp;

--- 4431,4440 ----
  buf_jump_open_tab(buf)
      buf_T	*buf;
  {
+     win_T	*wp = buf_jump_open_win(buf);
  # ifdef FEAT_WINDOWS
      tabpage_T	*tp;

      if (wp != NULL)
  	return wp;

***************
*** 4455,4467 ****
  		break;
  	    }
  	}
- 
-     return wp;
- # else
-     if (curwin->w_buffer == buf)
- 	return curwin;
-     return NULL;
  # endif
  }
  #endif

--- 4452,4459 ----
  		break;
  	    }
  	}
  # endif
+     return wp;
  }
  #endif

*** ../vim-7.4.486/src/testdir/Make_amiga.mak	2014-10-21 16:22:01.403175226 +0200
--- src/testdir/Make_amiga.mak	2014-10-21 20:46:30.866293607 +0200
***************
*** 46,51 ****
--- 46,52 ----
  		test_mapping.out \
  		test_options.out \
  		test_qf_title.out \
+ 		test_signs.out \
  		test_utf8.out

  .SUFFIXES: .in .out
***************
*** 179,182 ****
--- 180,184 ----
  test_listlbr_utf8.out: test_listlbr_utf8.in
  test_options.out: test_options.in
  test_qf_title.out: test_qf_title.in
+ test_signs.out: test_signs.in
  test_utf8.out: test_utf8.in
*** ../vim-7.4.486/src/testdir/Make_dos.mak	2014-10-21 16:22:01.407175226 +0200
--- src/testdir/Make_dos.mak	2014-10-21 20:46:30.866293607 +0200
***************
*** 45,50 ****
--- 45,51 ----
  		test_mapping.out \
  		test_options.out \
  		test_qf_title.out \
+ 		test_signs.out \
  		test_utf8.out

  SCRIPTS32 =	test50.out test70.out
*** ../vim-7.4.486/src/testdir/Make_ming.mak	2014-10-21 16:22:01.407175226 +0200
--- src/testdir/Make_ming.mak	2014-10-21 20:46:30.866293607 +0200
***************
*** 65,70 ****
--- 65,71 ----
  		test_mapping.out \
  		test_options.out \
  		test_qf_title.out \
+ 		test_signs.out \
  		test_utf8.out

  SCRIPTS32 =	test50.out test70.out
*** ../vim-7.4.486/src/testdir/Make_os2.mak	2014-10-21 16:22:01.407175226 +0200
--- src/testdir/Make_os2.mak	2014-10-21 20:46:30.866293607 +0200
***************
*** 47,52 ****
--- 47,53 ----
  		test_mapping.out \
  		test_options.out \
  		test_qf_title.out \
+ 		test_signs.out \
  		test_utf8.out

  .SUFFIXES: .in .out
*** ../vim-7.4.486/src/testdir/Make_vms.mms	2014-10-21 16:22:01.407175226 +0200
--- src/testdir/Make_vms.mms	2014-10-21 20:46:30.866293607 +0200
***************
*** 106,111 ****
--- 106,112 ----
  	 test_mapping.out \
  	 test_options.out \
  	 test_qf_title.out \
+ 	 test_signs.out \
  	 test_utf8.out

  # Known problems:
*** ../vim-7.4.486/src/testdir/Makefile	2014-10-21 16:22:01.407175226 +0200
--- src/testdir/Makefile	2014-10-21 20:46:30.866293607 +0200
***************
*** 43,48 ****
--- 43,49 ----
  		test_mapping.out \
  		test_options.out \
  		test_qf_title.out \
+ 		test_signs.out \
  		test_utf8.out

  SCRIPTS_GUI = test16.out
*** ../vim-7.4.486/src/testdir/test_signs.in	2014-10-21 20:56:35.838294928 +0200
--- src/testdir/test_signs.in	2014-10-21 20:46:30.866293607 +0200
***************
*** 0 ****
--- 1,22 ----
+ Tests for signs
+ STARTTEST
+ :so small.vim
+ :if !has("signs")
+ :  e! test.ok
+ :  wq! test.out
+ :endif
+ :"
+ :sign define JumpSign text=x
+ :exe 'sign place 42 line=2 name=JumpSign buffer=' . bufnr('')
+ :" Split the window to the bottom to verify :sign-jump will stay in the current
+ :" window if the buffer is displayed there
+ :bot split
+ :exe 'sign jump 42 buffer=' . bufnr('')
+ :call append(line('$'), winnr())
+ :$-1,$w! test.out
+ ENDTEST
+ 
+ STARTTEST
+ :qa!
+ ENDTEST
+ 
*** ../vim-7.4.486/src/testdir/test_signs.ok	2014-10-21 20:56:35.842294928 +0200
--- src/testdir/test_signs.ok	2014-10-21 20:46:30.866293607 +0200
***************
*** 0 ****
--- 1,2 ----
+ 
+ 2
*** ../vim-7.4.486/src/version.c	2014-10-21 20:01:54.986287762 +0200
--- src/version.c	2014-10-21 20:50:02.642294069 +0200
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     487,
  /**/

-- 
I'd like to meet the man who invented sex and see what he's working on now.

 /// Bram Moolenaar -- Bram <at> 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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bram Moolenaar | 21 Oct 20:02 2014
Picon
Picon

Patch 7.4.486


Patch 7.4.486
Problem:    Check for writing to a yank register is wrong.
Solution:   Negate the check. (Zyx).  Also clean up the #ifdefs.
Files:	    src/ex_docmd.c, src/ex_cmds.h

*** ../vim-7.4.485/src/ex_docmd.c	2014-09-19 20:07:22.546449677 +0200
--- src/ex_docmd.c	2014-10-21 19:56:31.290287055 +0200
***************
*** 49,58 ****
--- 49,63 ----
  static char_u *get_user_command_name __ARGS((int idx));
  # endif

+ /* Wether a command index indicates a user command. */
+ # define IS_USER_CMDIDX(idx) ((int)(idx) < 0)
+ 
  #else
  # define ex_command	ex_ni
  # define ex_comclear	ex_ni
  # define ex_delcommand	ex_ni
+ /* Wether a command index indicates a user command. */
+ # define IS_USER_CMDIDX(idx) (FALSE)
  #endif

  #ifdef FEAT_EVAL
***************
*** 2190,2200 ****
  	goto doend;
      }

!     ni = (
! #ifdef FEAT_USR_CMDS
! 	    !USER_CMDIDX(ea.cmdidx) &&
! #endif
! 	    (cmdnames[ea.cmdidx].cmd_func == ex_ni
  #ifdef HAVE_EX_SCRIPT_NI
  	     || cmdnames[ea.cmdidx].cmd_func == ex_script_ni
  #endif
--- 2195,2202 ----
  	goto doend;
      }

!     ni = (!IS_USER_CMDIDX(ea.cmdidx)
! 	    && (cmdnames[ea.cmdidx].cmd_func == ex_ni
  #ifdef HAVE_EX_SCRIPT_NI
  	     || cmdnames[ea.cmdidx].cmd_func == ex_script_ni
  #endif
***************
*** 2229,2237 ****
  /*
   * 5. parse arguments
   */
! #ifdef FEAT_USR_CMDS
!     if (!USER_CMDIDX(ea.cmdidx))
! #endif
  	ea.argt = (long)cmdnames[(int)ea.cmdidx].cmd_argt;

      if (!ea.skip)
--- 2231,2237 ----
  /*
   * 5. parse arguments
   */
!     if (!IS_USER_CMDIDX(ea.cmdidx))
  	ea.argt = (long)cmdnames[(int)ea.cmdidx].cmd_argt;

      if (!ea.skip)
***************
*** 2252,2261 ****
  	}

  	if (text_locked() && !(ea.argt & CMDWIN)
! # ifdef FEAT_USR_CMDS
! 		&& !USER_CMDIDX(ea.cmdidx)
! # endif
! 	   )
  	{
  	    /* Command not allowed when editing the command line. */
  #ifdef FEAT_CMDWIN
--- 2252,2258 ----
  	}

  	if (text_locked() && !(ea.argt & CMDWIN)
! 		&& !IS_USER_CMDIDX(ea.cmdidx))
  	{
  	    /* Command not allowed when editing the command line. */
  #ifdef FEAT_CMDWIN
***************
*** 2273,2281 ****
  	if (!(ea.argt & CMDWIN)
  		&& ea.cmdidx != CMD_edit
  		&& ea.cmdidx != CMD_checktime
! # ifdef FEAT_USR_CMDS
! 		&& !USER_CMDIDX(ea.cmdidx)
! # endif
  		&& curbuf_locked())
  	    goto doend;
  #endif
--- 2270,2276 ----
  	if (!(ea.argt & CMDWIN)
  		&& ea.cmdidx != CMD_edit
  		&& ea.cmdidx != CMD_checktime
! 		&& !IS_USER_CMDIDX(ea.cmdidx)
  		&& curbuf_locked())
  	    goto doend;
  #endif
***************
*** 2468,2477 ****
      /* accept numbered register only when no count allowed (:put) */
      if (       (ea.argt & REGSTR)
  	    && *ea.arg != NUL
! #ifdef FEAT_USR_CMDS
! 	    /* Do not allow register = for user commands */
! 	    && (!USER_CMDIDX(ea.cmdidx) || *ea.arg != '=')
! #endif
  	    && !((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg)))
      {
  #ifndef FEAT_CLIPBOARD
--- 2463,2470 ----
      /* accept numbered register only when no count allowed (:put) */
      if (       (ea.argt & REGSTR)
  	    && *ea.arg != NUL
! 	       /* Do not allow register = for user commands */
! 	    && (!IS_USER_CMDIDX(ea.cmdidx) || *ea.arg != '=')
  	    && !((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg)))
      {
  #ifndef FEAT_CLIPBOARD
***************
*** 2482,2495 ****
  	    goto doend;
  	}
  #endif
! 	if (
! #ifdef FEAT_USR_CMDS
! 	    valid_yank_reg(*ea.arg, (ea.cmdidx != CMD_put
! 						   && USER_CMDIDX(ea.cmdidx)))
! #else
! 	    valid_yank_reg(*ea.arg, ea.cmdidx != CMD_put)
! #endif
! 	   )
  	{
  	    ea.regname = *ea.arg++;
  #ifdef FEAT_EVAL
--- 2475,2482 ----
  	    goto doend;
  	}
  #endif
! 	if (valid_yank_reg(*ea.arg, (ea.cmdidx != CMD_put
! 					      && !IS_USER_CMDIDX(ea.cmdidx))))
  	{
  	    ea.regname = *ea.arg++;
  #ifdef FEAT_EVAL
***************
*** 2663,2672 ****
       * number.  Don't do this for a user command.
       */
      if ((ea.argt & BUFNAME) && *ea.arg != NUL && ea.addr_count == 0
! # ifdef FEAT_USR_CMDS
! 	    && !USER_CMDIDX(ea.cmdidx)
! # endif
! 	    )
      {
  	/*
  	 * :bdelete, :bwipeout and :bunload take several arguments, separated
--- 2650,2656 ----
       * number.  Don't do this for a user command.
       */
      if ((ea.argt & BUFNAME) && *ea.arg != NUL && ea.addr_count == 0
! 	    && !IS_USER_CMDIDX(ea.cmdidx))
      {
  	/*
  	 * :bdelete, :bwipeout and :bunload take several arguments, separated
***************
*** 2704,2710 ****
  #endif

  #ifdef FEAT_USR_CMDS
!     if (USER_CMDIDX(ea.cmdidx))
      {
  	/*
  	 * Execute a user-defined command.
--- 2688,2694 ----
  #endif

  #ifdef FEAT_USR_CMDS
!     if (IS_USER_CMDIDX(ea.cmdidx))
      {
  	/*
  	 * Execute a user-defined command.
***************
*** 2763,2773 ****
      }
  #ifdef FEAT_EVAL
      do_errthrow(cstack,
! 	    (ea.cmdidx != CMD_SIZE
! # ifdef FEAT_USR_CMDS
! 	     && !USER_CMDIDX(ea.cmdidx)
! # endif
! 	    ) ? cmdnames[(int)ea.cmdidx].cmd_name : (char_u *)NULL);
  #endif

      if (verbose_save >= 0)
--- 2747,2754 ----
      }
  #ifdef FEAT_EVAL
      do_errthrow(cstack,
! 	    (ea.cmdidx != CMD_SIZE && !IS_USER_CMDIDX(ea.cmdidx))
! 			? cmdnames[(int)ea.cmdidx].cmd_name : (char_u *)NULL);
  #endif

      if (verbose_save >= 0)
***************
*** 3361,3369 ****
  /*
   * 5. parse arguments
   */
! #ifdef FEAT_USR_CMDS
!     if (!USER_CMDIDX(ea.cmdidx))
! #endif
  	ea.argt = (long)cmdnames[(int)ea.cmdidx].cmd_argt;

      arg = skipwhite(p);
--- 3342,3348 ----
  /*
   * 5. parse arguments
   */
!     if (!IS_USER_CMDIDX(ea.cmdidx))
  	ea.argt = (long)cmdnames[(int)ea.cmdidx].cmd_argt;

      arg = skipwhite(p);
*** ../vim-7.4.485/src/ex_cmds.h	2014-09-19 20:07:22.546449677 +0200
--- src/ex_cmds.h	2014-10-21 19:52:45.926286562 +0200
***************
*** 1153,1160 ****
  #endif
  };

- #define USER_CMDIDX(idx) ((int)(idx) < 0)
- 
  #ifndef DO_DECLARE_EXCMD
  typedef enum CMD_index cmdidx_T;

--- 1153,1158 ----
*** ../vim-7.4.485/src/version.c	2014-10-21 19:35:28.406284296 +0200
--- src/version.c	2014-10-21 20:00:44.350287607 +0200
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     486,
  /**/

-- 
FATHER: One day, lad, all this will be yours ...
PRINCE: What - the curtains?
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- Bram <at> 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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bram Moolenaar | 21 Oct 19:35 2014
Picon
Picon

Patch 7.4.485


Patch 7.4.485 (after 7.4.484)
Problem:    Abbreviations don't work. (Toothpik)
Solution:   Move the length computation inside the for loop.  Compare against
	    the unescaped key.
Files:	    src/getchar.c

*** ../vim-7.4.484/src/getchar.c	2014-10-21 18:17:05.638274024 +0200
--- src/getchar.c	2014-10-21 19:30:46.262283680 +0200
***************
*** 4443,4449 ****
  #endif
      int		is_id = TRUE;
      int		vim_abbr;
-     int		qlen;		/* length of q, CSI/K_SPECIAL unescaped */

      if (typebuf.tb_no_abbr_cnt)	/* abbrev. are not recursive */
  	return FALSE;
--- 4443,4448 ----
***************
*** 4521,4549 ****
  #else
  	mp = first_abbr;
  #endif
- 	qlen = mp->m_keylen;
- 	if (vim_strbyte(mp->m_keys, K_SPECIAL) != NULL)
- 	{
- 	    char_u	*q = vim_strsave(mp->m_keys);
- 
- 	    /* might have CSI escaped mp->m_keys */
- 	    if (q != NULL)
- 	    {
- 		vim_unescape_csi(q);
- 		qlen = (int)STRLEN(q);
- 		vim_free(q);
- 	    }
- 	}
  	for ( ; mp;
  #ifdef FEAT_LOCALMAP
  		mp->m_next == NULL ? (mp = mp2, mp2 = NULL) :
  #endif
  		(mp = mp->m_next))
  	{
  	    /* find entries with right mode and keys */
! 	    if (       (mp->m_mode & State)
  		    && qlen == len
! 		    && !STRNCMP(mp->m_keys, ptr, (size_t)len))
  		break;
  	}
  	if (mp != NULL)
--- 4520,4553 ----
  #else
  	mp = first_abbr;
  #endif
  	for ( ; mp;
  #ifdef FEAT_LOCALMAP
  		mp->m_next == NULL ? (mp = mp2, mp2 = NULL) :
  #endif
  		(mp = mp->m_next))
  	{
+ 	    int		qlen = mp->m_keylen;
+ 	    char_u	*q = mp->m_keys;
+ 	    int		match;
+ 
+ 	    if (vim_strbyte(mp->m_keys, K_SPECIAL) != NULL)
+ 	    {
+ 		/* might have CSI escaped mp->m_keys */
+ 		q = vim_strsave(mp->m_keys);
+ 		if (q != NULL)
+ 		{
+ 		    vim_unescape_csi(q);
+ 		    qlen = (int)STRLEN(q);
+ 		}
+ 	    }
+ 
  	    /* find entries with right mode and keys */
! 	    match =    (mp->m_mode & State)
  		    && qlen == len
! 		    && !STRNCMP(q, ptr, (size_t)len);
! 	    if (q != mp->m_keys)
! 		vim_free(q);
! 	    if (match)
  		break;
  	}
  	if (mp != NULL)
*** ../vim-7.4.484/src/version.c	2014-10-21 18:17:05.638274024 +0200
--- src/version.c	2014-10-21 19:34:55.338284224 +0200
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     485,
  /**/

-- 
TALL KNIGHT: We shall say Ni! again to you if you do not appease us.
ARTHUR:      All right!  What do you want?
TALL KNIGHT: We want ... a shrubbery!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- Bram <at> 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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

toothpik | 21 Oct 18:55 2014
Picon

iabbrevs horked

I can't say positively it started today, but I did build a new vim
today, 7.4.483, and when I tried to make a log entry in a text file
discovered none of my iabbrevs were working

weirdly, dd almost works, but inserts what ddss is supposed to insert

iabbrev <silent> dd <c-r>=strftime("%Y-%b-%d")<cr><c-r>=Eatchar('\s')<cr>
iabbrev <silent> ddss <c-r>=strftime("%Y-%b-%d  %H:%M  %a")<cr><c-r>=Eatchar('\s')<cr>

my whole .vimrc can be seen at

    https://github.com/toothpik/toothpik-s-.vimrc/blob/master/.vimrc

most likely I've done something silly and embarrassing so please be kind
when you point it out

-- 
_|_ _  __|_|_ ._ o|  
 |_(_)(_)|_| ||_)||< 
              |      

-- 
--

-- 
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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ken Takata | 21 Oct 18:39 2014
Picon

[patch][Win32] Cannot open a file with 259 chars path

Hi,

Vim cannot open a file if the path is exactly 259 characters (MAX_PATH - 1)
and 'enc' is set to utf-8 on Windows.
Following patch fixes the problem:

--- a/src/os_mswin.c
+++ b/src/os_mswin.c
 <at>  <at>  -411,7 +411,7  <at>  <at>  mch_FullName(
 	     * - convert the result from UCS2 to 'encoding'.
 	     */
 	    wname = enc_to_utf16(fname, NULL);
-	    if (wname != NULL && _wfullpath(wbuf, wname, MAX_PATH - 1) != NULL)
+	    if (wname != NULL && _wfullpath(wbuf, wname, MAX_PATH) != NULL)
 	    {
 		cname = utf16_to_enc((short_u *)wbuf, NULL);
 		if (cname != NULL)

MAX_PATH is defined as 260 and it includes the last NUL.
The third parameter of _wfullpath() is length of the buffer including NUL, so
"- 1" is not needed.  (http://msdn.microsoft.com/en-us/library/506720ff.aspx)

Note: This problem is different from
https://groups.google.com/d/topic/vim_dev/N10OYqPMvy0/discussion .

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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Gmane