073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.330
073263
Fcc: outbox
073263
From: Bram Moolenaar <Bram@moolenaar.net>
073263
Mime-Version: 1.0
073263
Content-Type: text/plain; charset=UTF-8
073263
Content-Transfer-Encoding: 8bit
073263
------------
073263
073263
Patch 7.4.330
073263
Problem:    Using a regexp pattern to highlight a specific position can be
073263
	    slow.
073263
Solution:   Add matchaddpos() to highlight specific positions efficiently.
073263
	    (Alexey Radkov)
073263
Files:	    runtime/doc/eval.txt, runtime/doc/usr_41.txt,
073263
	    runtime/plugin/matchparen.vim, src/eval.c, src/ex_docmd.c,
073263
	    src/proto/window.pro, src/screen.c, src/structs.h,
073263
	    src/testdir/test63.in, src/testdir/test63.ok, src/window.c
073263
073263
073263
*** ../vim-7.4.329/runtime/doc/eval.txt	2014-05-28 20:31:37.500292805 +0200
073263
--- runtime/doc/eval.txt	2014-06-17 16:31:35.572453748 +0200
073263
***************
073263
*** 1887,1892 ****
073263
--- 1887,1894 ----
073263
  				Number	position where {pat} matches in {expr}
073263
  matchadd( {group}, {pattern}[, {priority}[, {id}]])
073263
  				Number	highlight {pattern} with {group}
073263
+ matchaddpos( {group}, {list}[, {priority}[, {id}]])
073263
+ 				Number	highlight positions with {group}
073263
  matcharg( {nr})			List	arguments of |:match|
073263
  matchdelete( {id})		Number	delete match identified by {id}
073263
  matchend( {expr}, {pat}[, {start}[, {count}]])
073263
***************
073263
*** 4342,4347 ****
073263
--- 4382,4422 ----
073263
  		available from |getmatches()|.	All matches can be deleted in
073263
  		one operation by |clearmatches()|.
073263
  
073263
+ matchaddpos({group}, {pos}[, {priority}[, {id}]])		*matchaddpos()*
073263
+ 		Same as |matchadd()|, but requires a list of positions {pos}
073263
+ 		instead of a pattern. This command is faster than |matchadd()|
073263
+ 		because it does not require to handle regular expressions and
073263
+ 		sets buffer line boundaries to redraw screen. It is supposed
073263
+ 		to be used when fast match additions and deletions are
073263
+ 		required, for example to highlight matching parentheses.
073263
+ 
073263
+ 		The list {pos} can contain one of these items:
073263
+ 		- A number.  This while line will be highlighted.  The first
073263
+ 		  line has number 1.
073263
+ 		- A list with one number, e.g., [23]. The whole line with this
073263
+ 		  number will be highlighted.
073263
+ 		- A list with two numbers, e.g., [23, 11]. The first number is
073263
+ 		  the line number, the second one the column number (first
073263
+ 		  column is 1).  The character at this position will be
073263
+ 		  highlighted.
073263
+ 		- A list with three numbers, e.g., [23, 11, 3]. As above, but
073263
+ 		  the third number gives the length of the highlight in screen
073263
+ 		  cells.
073263
+ 		
073263
+ 		The maximum number of positions is 8.
073263
+ 
073263
+ 		Example: >
073263
+ 			:highlight MyGroup ctermbg=green guibg=green
073263
+ 			:let m = matchaddpos("MyGroup", [[23, 24], 34])
073263
+ <		Deletion of the pattern: >
073263
+ 			:call matchdelete(m)
073263
+ 
073263
+ <		Matches added by |matchaddpos()| are returned by
073263
+ 		|getmatches()| with an entry "pos1", "pos2", etc., with the
073263
+ 		value a list like the {pos} item.
073263
+ 		These matches cannot be set via |setmatches()|, however they
073263
+ 		can still be deleted by |clearmatches()|.
073263
+ 
073263
  matcharg({nr})							*matcharg()*
073263
  		Selects the {nr} match item, as set with a |:match|,
073263
  		|:2match| or |:3match| command.
073263
*** ../vim-7.4.329/runtime/doc/usr_41.txt	2014-05-28 18:22:37.872225054 +0200
073263
--- runtime/doc/usr_41.txt	2014-06-17 14:06:44.836124965 +0200
073263
***************
073263
*** 824,829 ****
073263
--- 827,833 ----
073263
  	synconcealed()		get info about concealing
073263
  	diff_hlID()		get highlight ID for diff mode at a position
073263
  	matchadd()		define a pattern to highlight (a "match")
073263
+ 	matchaddpos()		define a list of positions to highlight
073263
  	matcharg()		get info about |:match| arguments
073263
  	matchdelete()		delete a match defined by |matchadd()| or a
073263
  				|:match| command
073263
*** ../vim-7.4.329/runtime/plugin/matchparen.vim	2013-05-08 05:15:53.000000000 +0200
073263
--- runtime/plugin/matchparen.vim	2014-06-17 14:14:45.712143158 +0200
073263
***************
073263
*** 1,6 ****
073263
  " Vim plugin for showing matching parens
073263
  " Maintainer:  Bram Moolenaar <Bram@vim.org>
073263
! " Last Change: 2013 May 08
073263
  
073263
  " Exit quickly when:
073263
  " - this plugin was already loaded (or disabled)
073263
--- 1,6 ----
073263
  " Vim plugin for showing matching parens
073263
  " Maintainer:  Bram Moolenaar <Bram@vim.org>
073263
! " Last Change: 2014 Jun 17
073263
  
073263
  " Exit quickly when:
073263
  " - this plugin was already loaded (or disabled)
073263
***************
073263
*** 39,45 ****
073263
  function! s:Highlight_Matching_Pair()
073263
    " Remove any previous match.
073263
    if exists('w:paren_hl_on') && w:paren_hl_on
073263
!     3match none
073263
      let w:paren_hl_on = 0
073263
    endif
073263
  
073263
--- 39,45 ----
073263
  function! s:Highlight_Matching_Pair()
073263
    " Remove any previous match.
073263
    if exists('w:paren_hl_on') && w:paren_hl_on
073263
!     silent! call matchdelete(3)
073263
      let w:paren_hl_on = 0
073263
    endif
073263
  
073263
***************
073263
*** 152,165 ****
073263
  
073263
    " If a match is found setup match highlighting.
073263
    if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom 
073263
!     exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) .
073263
! 	  \ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
073263
      let w:paren_hl_on = 1
073263
    endif
073263
  endfunction
073263
  
073263
  " Define commands that will disable and enable the plugin.
073263
! command! NoMatchParen windo 3match none | unlet! g:loaded_matchparen |
073263
  	  \ au! matchparen
073263
  command! DoMatchParen runtime plugin/matchparen.vim | windo doau CursorMoved
073263
  
073263
--- 152,169 ----
073263
  
073263
    " If a match is found setup match highlighting.
073263
    if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom 
073263
!     if exists('*matchaddpos')
073263
!       call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3)
073263
!     else
073263
!       exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) .
073263
! 	    \ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
073263
!     endif
073263
      let w:paren_hl_on = 1
073263
    endif
073263
  endfunction
073263
  
073263
  " Define commands that will disable and enable the plugin.
073263
! command! NoMatchParen windo silent! call matchdelete(3) | unlet! g:loaded_matchparen |
073263
  	  \ au! matchparen
073263
  command! DoMatchParen runtime plugin/matchparen.vim | windo doau CursorMoved
073263
  
073263
*** ../vim-7.4.329/src/eval.c	2014-06-17 12:51:13.207953527 +0200
073263
--- src/eval.c	2014-06-17 17:02:25.388523729 +0200
073263
***************
073263
*** 622,627 ****
073263
--- 622,628 ----
073263
  static void f_mapcheck __ARGS((typval_T *argvars, typval_T *rettv));
073263
  static void f_match __ARGS((typval_T *argvars, typval_T *rettv));
073263
  static void f_matchadd __ARGS((typval_T *argvars, typval_T *rettv));
073263
+ static void f_matchaddpos __ARGS((typval_T *argvars, typval_T *rettv));
073263
  static void f_matcharg __ARGS((typval_T *argvars, typval_T *rettv));
073263
  static void f_matchdelete __ARGS((typval_T *argvars, typval_T *rettv));
073263
  static void f_matchend __ARGS((typval_T *argvars, typval_T *rettv));
073263
***************
073263
*** 8054,8059 ****
073263
--- 8055,8061 ----
073263
      {"mapcheck",	1, 3, f_mapcheck},
073263
      {"match",		2, 4, f_match},
073263
      {"matchadd",	2, 4, f_matchadd},
073263
+     {"matchaddpos",	2, 4, f_matchaddpos},
073263
      {"matcharg",	1, 1, f_matcharg},
073263
      {"matchdelete",	1, 1, f_matchdelete},
073263
      {"matchend",	2, 4, f_matchend},
073263
***************
073263
*** 11767,11772 ****
073263
--- 11769,11775 ----
073263
  #ifdef FEAT_SEARCH_EXTRA
073263
      dict_T	*dict;
073263
      matchitem_T	*cur = curwin->w_match_head;
073263
+     int		i;
073263
  
073263
      if (rettv_list_alloc(rettv) == OK)
073263
      {
073263
***************
073263
*** 11775,11782 ****
073263
  	    dict = dict_alloc();
073263
  	    if (dict == NULL)
073263
  		return;
073263
  	    dict_add_nr_str(dict, "group", 0L, syn_id2name(cur->hlg_id));
073263
- 	    dict_add_nr_str(dict, "pattern", 0L, cur->pattern);
073263
  	    dict_add_nr_str(dict, "priority", (long)cur->priority, NULL);
073263
  	    dict_add_nr_str(dict, "id", (long)cur->id, NULL);
073263
  	    list_append_dict(rettv->vval.v_list, dict);
073263
--- 11778,11813 ----
073263
  	    dict = dict_alloc();
073263
  	    if (dict == NULL)
073263
  		return;
073263
+ 	    if (cur->match.regprog == NULL)
073263
+ 	    {
073263
+ 		/* match added with matchaddpos() */
073263
+ 		for (i = 0; i < MAXPOSMATCH; ++i)
073263
+ 		{
073263
+ 		    llpos_T	*llpos;
073263
+ 		    char	buf[6];
073263
+ 		    list_T	*l;
073263
+ 
073263
+ 		    llpos = &cur->pos.pos[i];
073263
+ 		    if (llpos->lnum == 0)
073263
+ 			break;
073263
+ 		    l = list_alloc();
073263
+ 		    if (l == NULL)
073263
+ 			break;
073263
+ 		    list_append_number(l, (varnumber_T)llpos->lnum);
073263
+ 		    if (llpos->col > 0)
073263
+ 		    {
073263
+ 			list_append_number(l, (varnumber_T)llpos->col);
073263
+ 			list_append_number(l, (varnumber_T)llpos->len);
073263
+ 		    }
073263
+ 		    sprintf(buf, "pos%d", i + 1);
073263
+ 		    dict_add_list(dict, buf, l);
073263
+ 		}
073263
+ 	    }
073263
+ 	    else
073263
+ 	    {
073263
+ 		dict_add_nr_str(dict, "pattern", 0L, cur->pattern);
073263
+ 	    }
073263
  	    dict_add_nr_str(dict, "group", 0L, syn_id2name(cur->hlg_id));
073263
  	    dict_add_nr_str(dict, "priority", (long)cur->priority, NULL);
073263
  	    dict_add_nr_str(dict, "id", (long)cur->id, NULL);
073263
  	    list_append_dict(rettv->vval.v_list, dict);
073263
***************
073263
*** 14313,14319 ****
073263
  	return;
073263
      }
073263
  
073263
!     rettv->vval.v_number = match_add(curwin, grp, pat, prio, id);
073263
  #endif
073263
  }
073263
  
073263
--- 14344,14401 ----
073263
  	return;
073263
      }
073263
  
073263
!     rettv->vval.v_number = match_add(curwin, grp, pat, prio, id, NULL);
073263
! #endif
073263
! }
073263
! 
073263
! /*
073263
!  * "matchaddpos()" function
073263
!  */
073263
!     static void
073263
! f_matchaddpos(argvars, rettv)
073263
!     typval_T	*argvars UNUSED;
073263
!     typval_T	*rettv UNUSED;
073263
! {
073263
! #ifdef FEAT_SEARCH_EXTRA
073263
!     char_u	buf[NUMBUFLEN];
073263
!     char_u	*group;
073263
!     int		prio = 10;
073263
!     int		id = -1;
073263
!     int		error = FALSE;
073263
!     list_T	*l;
073263
! 
073263
!     rettv->vval.v_number = -1;
073263
! 
073263
!     group = get_tv_string_buf_chk(&argvars[0], buf);
073263
!     if (group == NULL)
073263
! 	return;
073263
! 
073263
!     if (argvars[1].v_type != VAR_LIST)
073263
!     {
073263
! 	EMSG2(_(e_listarg), "matchaddpos()");
073263
! 	return;
073263
!     }
073263
!     l = argvars[1].vval.v_list;
073263
!     if (l == NULL)
073263
! 	return;
073263
! 
073263
!     if (argvars[2].v_type != VAR_UNKNOWN)
073263
!     {
073263
! 	prio = get_tv_number_chk(&argvars[2], &error);
073263
! 	if (argvars[3].v_type != VAR_UNKNOWN)
073263
! 	    id = get_tv_number_chk(&argvars[3], &error);
073263
!     }
073263
!     if (error == TRUE)
073263
! 	return;
073263
! 
073263
!     /* id == 3 is ok because matchaddpos() is supposed to substitute :3match */
073263
!     if (id == 1 || id == 2)
073263
!     {
073263
! 	EMSGN("E798: ID is reserved for \":match\": %ld", id);
073263
! 	return;
073263
!     }
073263
! 
073263
!     rettv->vval.v_number = match_add(curwin, group, NULL, prio, id, l);
073263
  #endif
073263
  }
073263
  
073263
***************
073263
*** 16816,16822 ****
073263
  	    match_add(curwin, get_dict_string(d, (char_u *)"group", FALSE),
073263
  		    get_dict_string(d, (char_u *)"pattern", FALSE),
073263
  		    (int)get_dict_number(d, (char_u *)"priority"),
073263
! 		    (int)get_dict_number(d, (char_u *)"id"));
073263
  	    li = li->li_next;
073263
  	}
073263
  	rettv->vval.v_number = 0;
073263
--- 16898,16904 ----
073263
  	    match_add(curwin, get_dict_string(d, (char_u *)"group", FALSE),
073263
  		    get_dict_string(d, (char_u *)"pattern", FALSE),
073263
  		    (int)get_dict_number(d, (char_u *)"priority"),
073263
! 		    (int)get_dict_number(d, (char_u *)"id"), NULL);
073263
  	    li = li->li_next;
073263
  	}
073263
  	rettv->vval.v_number = 0;
073263
*** ../vim-7.4.329/src/ex_docmd.c	2014-05-28 18:22:37.876225054 +0200
073263
--- src/ex_docmd.c	2014-06-17 14:06:44.844124966 +0200
073263
***************
073263
*** 11489,11495 ****
073263
  
073263
  	    c = *end;
073263
  	    *end = NUL;
073263
! 	    match_add(curwin, g, p + 1, 10, id);
073263
  	    vim_free(g);
073263
  	    *end = c;
073263
  	}
073263
--- 11489,11495 ----
073263
  
073263
  	    c = *end;
073263
  	    *end = NUL;
073263
! 	    match_add(curwin, g, p + 1, 10, id, NULL);
073263
  	    vim_free(g);
073263
  	    *end = c;
073263
  	}
073263
*** ../vim-7.4.329/src/proto/window.pro	2013-08-14 17:11:14.000000000 +0200
073263
--- src/proto/window.pro	2014-06-17 14:06:44.844124966 +0200
073263
***************
073263
*** 75,81 ****
073263
  void switch_buffer __ARGS((buf_T **save_curbuf, buf_T *buf));
073263
  void restore_buffer __ARGS((buf_T *save_curbuf));
073263
  int win_hasvertsplit __ARGS((void));
073263
! int match_add __ARGS((win_T *wp, char_u *grp, char_u *pat, int prio, int id));
073263
  int match_delete __ARGS((win_T *wp, int id, int perr));
073263
  void clear_matches __ARGS((win_T *wp));
073263
  matchitem_T *get_match __ARGS((win_T *wp, int id));
073263
--- 75,81 ----
073263
  void switch_buffer __ARGS((buf_T **save_curbuf, buf_T *buf));
073263
  void restore_buffer __ARGS((buf_T *save_curbuf));
073263
  int win_hasvertsplit __ARGS((void));
073263
! int match_add __ARGS((win_T *wp, char_u *grp, char_u *pat, int prio, int id, list_T *pos));
073263
  int match_delete __ARGS((win_T *wp, int id, int perr));
073263
  void clear_matches __ARGS((win_T *wp));
073263
  matchitem_T *get_match __ARGS((win_T *wp, int id));
073263
*** ../vim-7.4.329/src/screen.c	2014-05-28 21:40:47.092329130 +0200
073263
--- src/screen.c	2014-06-17 17:04:08.064527614 +0200
073263
***************
073263
*** 144,150 ****
073263
  static void end_search_hl __ARGS((void));
073263
  static void init_search_hl __ARGS((win_T *wp));
073263
  static void prepare_search_hl __ARGS((win_T *wp, linenr_T lnum));
073263
! static void next_search_hl __ARGS((win_T *win, match_T *shl, linenr_T lnum, colnr_T mincol));
073263
  #endif
073263
  static void screen_start_highlight __ARGS((int attr));
073263
  static void screen_char __ARGS((unsigned off, int row, int col));
073263
--- 144,151 ----
073263
  static void end_search_hl __ARGS((void));
073263
  static void init_search_hl __ARGS((win_T *wp));
073263
  static void prepare_search_hl __ARGS((win_T *wp, linenr_T lnum));
073263
! static void next_search_hl __ARGS((win_T *win, match_T *shl, linenr_T lnum, colnr_T mincol, matchitem_T *cur));
073263
! static int next_search_hl_pos __ARGS((match_T *shl, linenr_T lnum, posmatch_T *pos, colnr_T mincol));
073263
  #endif
073263
  static void screen_start_highlight __ARGS((int attr));
073263
  static void screen_char __ARGS((unsigned off, int row, int col));
073263
***************
073263
*** 2929,2934 ****
073263
--- 2930,2937 ----
073263
      match_T	*shl;			/* points to search_hl or a match */
073263
      int		shl_flag;		/* flag to indicate whether search_hl
073263
  					   has been processed or not */
073263
+     int		pos_inprogress;		/* marks that position match search is
073263
+ 					   in progress */
073263
      int		prevcol_hl_flag;	/* flag to indicate whether prevcol
073263
  					   equals startcol of search_hl or one
073263
  					   of the matches */
073263
***************
073263
*** 3439,3482 ****
073263
  	shl->startcol = MAXCOL;
073263
  	shl->endcol = MAXCOL;
073263
  	shl->attr_cur = 0;
073263
! 	if (shl->rm.regprog != NULL)
073263
! 	{
073263
! 	    v = (long)(ptr - line);
073263
! 	    next_search_hl(wp, shl, lnum, (colnr_T)v);
073263
! 
073263
! 	    /* Need to get the line again, a multi-line regexp may have made it
073263
! 	     * invalid. */
073263
! 	    line = ml_get_buf(wp->w_buffer, lnum, FALSE);
073263
! 	    ptr = line + v;
073263
  
073263
! 	    if (shl->lnum != 0 && shl->lnum <= lnum)
073263
  	    {
073263
- 		if (shl->lnum == lnum)
073263
- 		    shl->startcol = shl->rm.startpos[0].col;
073263
- 		else
073263
- 		    shl->startcol = 0;
073263
- 		if (lnum == shl->lnum + shl->rm.endpos[0].lnum
073263
- 						  - shl->rm.startpos[0].lnum)
073263
- 		    shl->endcol = shl->rm.endpos[0].col;
073263
- 		else
073263
- 		    shl->endcol = MAXCOL;
073263
- 		/* Highlight one character for an empty match. */
073263
- 		if (shl->startcol == shl->endcol)
073263
- 		{
073263
  #ifdef FEAT_MBYTE
073263
! 		    if (has_mbyte && line[shl->endcol] != NUL)
073263
! 			shl->endcol += (*mb_ptr2len)(line + shl->endcol);
073263
! 		    else
073263
  #endif
073263
! 			++shl->endcol;
073263
! 		}
073263
! 		if ((long)shl->startcol < v)  /* match at leftcol */
073263
! 		{
073263
! 		    shl->attr_cur = shl->attr;
073263
! 		    search_attr = shl->attr;
073263
! 		}
073263
! 		area_highlighting = TRUE;
073263
  	    }
073263
  	}
073263
  	if (shl != &search_hl && cur != NULL)
073263
  	    cur = cur->next;
073263
--- 3442,3484 ----
073263
  	shl->startcol = MAXCOL;
073263
  	shl->endcol = MAXCOL;
073263
  	shl->attr_cur = 0;
073263
! 	v = (long)(ptr - line);
073263
! 	if (cur != NULL)
073263
! 	    cur->pos.cur = 0;
073263
! 	next_search_hl(wp, shl, lnum, (colnr_T)v, cur);
073263
! 
073263
! 	/* Need to get the line again, a multi-line regexp may have made it
073263
! 	 * invalid. */
073263
! 	line = ml_get_buf(wp->w_buffer, lnum, FALSE);
073263
! 	ptr = line + v;
073263
  
073263
! 	if (shl->lnum != 0 && shl->lnum <= lnum)
073263
! 	{
073263
! 	    if (shl->lnum == lnum)
073263
! 		shl->startcol = shl->rm.startpos[0].col;
073263
! 	    else
073263
! 		shl->startcol = 0;
073263
! 	    if (lnum == shl->lnum + shl->rm.endpos[0].lnum
073263
! 						- shl->rm.startpos[0].lnum)
073263
! 		shl->endcol = shl->rm.endpos[0].col;
073263
! 	    else
073263
! 		shl->endcol = MAXCOL;
073263
! 	    /* Highlight one character for an empty match. */
073263
! 	    if (shl->startcol == shl->endcol)
073263
  	    {
073263
  #ifdef FEAT_MBYTE
073263
! 		if (has_mbyte && line[shl->endcol] != NUL)
073263
! 		    shl->endcol += (*mb_ptr2len)(line + shl->endcol);
073263
! 		else
073263
  #endif
073263
! 		    ++shl->endcol;
073263
  	    }
073263
+ 	    if ((long)shl->startcol < v)  /* match at leftcol */
073263
+ 	    {
073263
+ 		shl->attr_cur = shl->attr;
073263
+ 		search_attr = shl->attr;
073263
+ 	    }
073263
+ 	    area_highlighting = TRUE;
073263
  	}
073263
  	if (shl != &search_hl && cur != NULL)
073263
  	    cur = cur->next;
073263
***************
073263
*** 3488,3494 ****
073263
       * when Visual mode is active, because it's not clear what is selected
073263
       * then. */
073263
      if (wp->w_p_cul && lnum == wp->w_cursor.lnum
073263
! 					 && !(wp == curwin  && VIsual_active))
073263
      {
073263
  	line_attr = hl_attr(HLF_CUL);
073263
  	area_highlighting = TRUE;
073263
--- 3490,3496 ----
073263
       * when Visual mode is active, because it's not clear what is selected
073263
       * then. */
073263
      if (wp->w_p_cul && lnum == wp->w_cursor.lnum
073263
! 					 && !(wp == curwin && VIsual_active))
073263
      {
073263
  	line_attr = hl_attr(HLF_CUL);
073263
  	area_highlighting = TRUE;
073263
***************
073263
*** 3792,3798 ****
073263
  		    }
073263
  		    else
073263
  			shl = &cur->hl;
073263
! 		    while (shl->rm.regprog != NULL)
073263
  		    {
073263
  			if (shl->startcol != MAXCOL
073263
  				&& v >= (long)shl->startcol
073263
--- 3794,3804 ----
073263
  		    }
073263
  		    else
073263
  			shl = &cur->hl;
073263
! 		    if (cur != NULL)
073263
! 			cur->pos.cur = 0;
073263
! 		    pos_inprogress = TRUE;
073263
! 		    while (shl->rm.regprog != NULL
073263
! 					   || (cur != NULL && pos_inprogress))
073263
  		    {
073263
  			if (shl->startcol != MAXCOL
073263
  				&& v >= (long)shl->startcol
073263
***************
073263
*** 3803,3810 ****
073263
  			else if (v == (long)shl->endcol)
073263
  			{
073263
  			    shl->attr_cur = 0;
073263
! 
073263
! 			    next_search_hl(wp, shl, lnum, (colnr_T)v);
073263
  
073263
  			    /* Need to get the line again, a multi-line regexp
073263
  			     * may have made it invalid. */
073263
--- 3809,3817 ----
073263
  			else if (v == (long)shl->endcol)
073263
  			{
073263
  			    shl->attr_cur = 0;
073263
! 			    next_search_hl(wp, shl, lnum, (colnr_T)v, cur);
073263
! 			    pos_inprogress = cur == NULL || cur->pos.cur == 0
073263
! 							      ? FALSE : TRUE;
073263
  
073263
  			    /* Need to get the line again, a multi-line regexp
073263
  			     * may have made it invalid. */
073263
***************
073263
*** 7277,7282 ****
073263
--- 7284,7291 ----
073263
      match_T	*shl;		/* points to search_hl or a match */
073263
      int		shl_flag;	/* flag to indicate whether search_hl
073263
  				   has been processed or not */
073263
+     int		pos_inprogress;	/* marks that position match search is
073263
+ 				   in progress */
073263
      int		n;
073263
  
073263
      /*
073263
***************
073263
*** 7311,7320 ****
073263
  		shl->first_lnum = wp->w_topline;
073263
  # endif
073263
  	    }
073263
  	    n = 0;
073263
! 	    while (shl->first_lnum < lnum && shl->rm.regprog != NULL)
073263
  	    {
073263
! 		next_search_hl(wp, shl, shl->first_lnum, (colnr_T)n);
073263
  		if (shl->lnum != 0)
073263
  		{
073263
  		    shl->first_lnum = shl->lnum
073263
--- 7320,7335 ----
073263
  		shl->first_lnum = wp->w_topline;
073263
  # endif
073263
  	    }
073263
+ 	    if (cur != NULL)
073263
+ 		cur->pos.cur = 0;
073263
+ 	    pos_inprogress = TRUE;
073263
  	    n = 0;
073263
! 	    while (shl->first_lnum < lnum && (shl->rm.regprog != NULL
073263
! 					  || (cur != NULL && pos_inprogress)))
073263
  	    {
073263
! 		next_search_hl(wp, shl, shl->first_lnum, (colnr_T)n, cur);
073263
! 		pos_inprogress = cur == NULL || cur->pos.cur == 0
073263
! 							      ? FALSE : TRUE;
073263
  		if (shl->lnum != 0)
073263
  		{
073263
  		    shl->first_lnum = shl->lnum
073263
***************
073263
*** 7343,7353 ****
073263
   * Careful: Any pointers for buffer lines will become invalid.
073263
   */
073263
      static void
073263
! next_search_hl(win, shl, lnum, mincol)
073263
!     win_T	*win;
073263
!     match_T	*shl;		/* points to search_hl or a match */
073263
!     linenr_T	lnum;
073263
!     colnr_T	mincol;		/* minimal column for a match */
073263
  {
073263
      linenr_T	l;
073263
      colnr_T	matchcol;
073263
--- 7358,7369 ----
073263
   * Careful: Any pointers for buffer lines will become invalid.
073263
   */
073263
      static void
073263
! next_search_hl(win, shl, lnum, mincol, cur)
073263
!     win_T	    *win;
073263
!     match_T	    *shl;	/* points to search_hl or a match */
073263
!     linenr_T	    lnum;
073263
!     colnr_T	    mincol;	/* minimal column for a match */
073263
!     matchitem_T	    *cur;	/* to retrieve match postions if any */
073263
  {
073263
      linenr_T	l;
073263
      colnr_T	matchcol;
073263
***************
073263
*** 7415,7440 ****
073263
  	    matchcol = shl->rm.endpos[0].col;
073263
  
073263
  	shl->lnum = lnum;
073263
! 	nmatched = vim_regexec_multi(&shl->rm, win, shl->buf, lnum, matchcol,
073263
  #ifdef FEAT_RELTIME
073263
! 		&(shl->tm)
073263
  #else
073263
! 		NULL
073263
  #endif
073263
! 		);
073263
! 	if (called_emsg || got_int)
073263
! 	{
073263
! 	    /* Error while handling regexp: stop using this regexp. */
073263
! 	    if (shl == &search_hl)
073263
  	    {
073263
! 		/* don't free regprog in the match list, it's a copy */
073263
! 		vim_regfree(shl->rm.regprog);
073263
! 		SET_NO_HLSEARCH(TRUE);
073263
  	    }
073263
! 	    shl->rm.regprog = NULL;
073263
! 	    shl->lnum = 0;
073263
! 	    got_int = FALSE;  /* avoid the "Type :quit to exit Vim" message */
073263
! 	    break;
073263
  	}
073263
  	if (nmatched == 0)
073263
  	{
073263
--- 7431,7465 ----
073263
  	    matchcol = shl->rm.endpos[0].col;
073263
  
073263
  	shl->lnum = lnum;
073263
! 	if (shl->rm.regprog != NULL)
073263
! 	{
073263
! 	    nmatched = vim_regexec_multi(&shl->rm, win, shl->buf, lnum,
073263
! 		    matchcol,
073263
  #ifdef FEAT_RELTIME
073263
! 		    &(shl->tm)
073263
  #else
073263
! 		    NULL
073263
  #endif
073263
! 		    );
073263
! 	    if (called_emsg || got_int)
073263
  	    {
073263
! 		/* Error while handling regexp: stop using this regexp. */
073263
! 		if (shl == &search_hl)
073263
! 		{
073263
! 		    /* don't free regprog in the match list, it's a copy */
073263
! 		    vim_regfree(shl->rm.regprog);
073263
! 		    SET_NO_HLSEARCH(TRUE);
073263
! 		}
073263
! 		shl->rm.regprog = NULL;
073263
! 		shl->lnum = 0;
073263
! 		got_int = FALSE;  /* avoid the "Type :quit to exit Vim"
073263
! 				     message */
073263
! 		break;
073263
  	    }
073263
! 	}
073263
! 	else if (cur != NULL)
073263
! 	{
073263
! 	    nmatched = next_search_hl_pos(shl, lnum, &(cur->pos), matchcol);
073263
  	}
073263
  	if (nmatched == 0)
073263
  	{
073263
***************
073263
*** 7453,7458 ****
073263
--- 7478,7539 ----
073263
  }
073263
  #endif
073263
  
073263
+     static int
073263
+ next_search_hl_pos(shl, lnum, posmatch, mincol)
073263
+     match_T	    *shl;	/* points to a match */
073263
+     linenr_T	    lnum;
073263
+     posmatch_T	    *posmatch;	/* match positions */
073263
+     colnr_T	    mincol;	/* minimal column for a match */
073263
+ {
073263
+     int	    i;
073263
+     int     bot = -1;
073263
+ 
073263
+     shl->lnum = 0;
073263
+     for (i = posmatch->cur; i < MAXPOSMATCH; i++)
073263
+     {
073263
+ 	if (posmatch->pos[i].lnum == 0)
073263
+ 	    break;
073263
+ 	if (posmatch->pos[i].col < mincol)
073263
+ 	    continue;
073263
+ 	if (posmatch->pos[i].lnum == lnum)
073263
+ 	{
073263
+ 	    if (shl->lnum == lnum)
073263
+ 	    {
073263
+ 		/* partially sort positions by column numbers
073263
+ 		 * on the same line */
073263
+ 		if (posmatch->pos[i].col < posmatch->pos[bot].col)
073263
+ 		{
073263
+ 		    llpos_T	tmp = posmatch->pos[i];
073263
+ 
073263
+ 		    posmatch->pos[i] = posmatch->pos[bot];
073263
+ 		    posmatch->pos[bot] = tmp;
073263
+ 		}
073263
+ 	    }
073263
+ 	    else
073263
+ 	    {
073263
+ 		bot = i;
073263
+ 		shl->lnum = lnum;
073263
+ 	    }
073263
+ 	}
073263
+     }
073263
+     posmatch->cur = 0;
073263
+     if (shl->lnum == lnum)
073263
+     {
073263
+ 	colnr_T	start = posmatch->pos[bot].col == 0
073263
+ 					     ? 0 : posmatch->pos[bot].col - 1;
073263
+ 	colnr_T	end = posmatch->pos[bot].col == 0
073263
+ 				    ? MAXCOL : start + posmatch->pos[bot].len;
073263
+ 
073263
+ 	shl->rm.startpos[0].lnum = 0;
073263
+ 	shl->rm.startpos[0].col = start;
073263
+ 	shl->rm.endpos[0].lnum = 0;
073263
+ 	shl->rm.endpos[0].col = end;
073263
+ 	posmatch->cur = bot + 1;
073263
+ 	return TRUE;
073263
+     }
073263
+     return FALSE;
073263
+ }
073263
+ 
073263
        static void
073263
  screen_start_highlight(attr)
073263
        int	attr;
073263
*** ../vim-7.4.329/src/structs.h	2014-05-28 18:22:37.876225054 +0200
073263
--- src/structs.h	2014-06-17 17:00:55.524520330 +0200
073263
***************
073263
*** 1927,1932 ****
073263
--- 1927,1958 ----
073263
  #endif
073263
  } match_T;
073263
  
073263
+ /* number of positions supported by matchaddpos() */
073263
+ #define MAXPOSMATCH 8
073263
+ 
073263
+ /*
073263
+  * Same as lpos_T, but with additional field len.
073263
+  */
073263
+ typedef struct
073263
+ {
073263
+     linenr_T	lnum;	/* line number */
073263
+     colnr_T	col;	/* column number */
073263
+     int		len;	/* length: 0 - to the end of line */
073263
+ } llpos_T;
073263
+ 
073263
+ /*
073263
+  * posmatch_T provides an array for storing match items for matchaddpos()
073263
+  * function.
073263
+  */
073263
+ typedef struct posmatch posmatch_T;
073263
+ struct posmatch
073263
+ {
073263
+     llpos_T	pos[MAXPOSMATCH];	/* array of positions */
073263
+     int		cur;			/* internal position counter */
073263
+     linenr_T	toplnum;		/* top buffer line */
073263
+     linenr_T	botlnum;		/* bottom buffer line */
073263
+ };
073263
+ 
073263
  /*
073263
   * matchitem_T provides a linked list for storing match items for ":match" and
073263
   * the match functions.
073263
***************
073263
*** 1940,1945 ****
073263
--- 1966,1972 ----
073263
      char_u	*pattern;   /* pattern to highlight */
073263
      int		hlg_id;	    /* highlight group ID */
073263
      regmmatch_T	match;	    /* regexp program for pattern */
073263
+     posmatch_T	pos;	    /* position matches */
073263
      match_T	hl;	    /* struct for doing the actual highlighting */
073263
  };
073263
  
073263
*** ../vim-7.4.329/src/testdir/test63.in	2010-05-15 13:04:10.000000000 +0200
073263
--- src/testdir/test63.in	2014-06-17 16:29:36.056449227 +0200
073263
***************
073263
*** 1,5 ****
073263
  Test for ":match", ":2match", ":3match", "clearmatches()", "getmatches()",
073263
! "matchadd()", "matcharg()", "matchdelete()", and "setmatches()".
073263
  
073263
  STARTTEST
073263
  :so small.vim
073263
--- 1,5 ----
073263
  Test for ":match", ":2match", ":3match", "clearmatches()", "getmatches()",
073263
! "matchadd()", "matchaddpos", "matcharg()", "matchdelete()", and "setmatches()".
073263
  
073263
  STARTTEST
073263
  :so small.vim
073263
***************
073263
*** 147,155 ****
073263
  :unlet rf1
073263
  :unlet rf2
073263
  :unlet rf3
073263
! :highlight clear MyGroup1
073263
! :highlight clear MyGroup2
073263
! :highlight clear MyGroup3
073263
  G"rp
073263
  :/^Results/,$wq! test.out
073263
  ENDTEST
073263
--- 147,172 ----
073263
  :unlet rf1
073263
  :unlet rf2
073263
  :unlet rf3
073263
! :" --- Check that "matchaddpos()" positions matches correctly
073263
! :let @r .= "*** Test 11:\n"
073263
! :set nolazyredraw
073263
! :call setline(1, 'abcdefghijklmnopq')
073263
! :call matchaddpos("MyGroup1", [[1, 5], [1, 8, 3]], 10, 3)
073263
! :1
073263
! :redraw!
073263
! :let v1 = screenattr(1, 1)
073263
! :let v5 = screenattr(1, 5)
073263
! :let v6 = screenattr(1, 6)
073263
! :let v8 = screenattr(1, 8)
073263
! :let v10 = screenattr(1, 10)
073263
! :let v11 = screenattr(1, 11)
073263
! :let @r .= string(getmatches())."\n"
073263
! :if v1 != v5 && v6 == v1 && v8 == v5 && v10 == v5 && v11 == v1
073263
! :  let @r .= "OK\n"
073263
! :else
073263
! :  let @r .= "FAILED\n"
073263
! :endif
073263
! :call clearmatches()
073263
  G"rp
073263
  :/^Results/,$wq! test.out
073263
  ENDTEST
073263
*** ../vim-7.4.329/src/testdir/test63.ok	2010-05-15 13:04:10.000000000 +0200
073263
--- src/testdir/test63.ok	2014-06-17 17:32:57.036593023 +0200
073263
***************
073263
*** 9,11 ****
073263
--- 9,14 ----
073263
  *** Test 8: OK
073263
  *** Test 9: OK
073263
  *** Test 10: OK
073263
+ *** Test 11:
073263
+ [{'group': 'MyGroup1', 'id': 3, 'priority': 10, 'pos1': [1, 5, 1], 'pos2': [1, 8, 3]}]
073263
+ OK
073263
*** ../vim-7.4.329/src/window.c	2014-06-17 13:52:35.868092848 +0200
073263
--- src/window.c	2014-06-17 17:04:51.060529240 +0200
073263
***************
073263
*** 6751,6770 ****
073263
   * Return ID of added match, -1 on failure.
073263
   */
073263
      int
073263
! match_add(wp, grp, pat, prio, id)
073263
      win_T	*wp;
073263
      char_u	*grp;
073263
      char_u	*pat;
073263
      int		prio;
073263
      int		id;
073263
  {
073263
!     matchitem_T *cur;
073263
!     matchitem_T *prev;
073263
!     matchitem_T *m;
073263
      int		hlg_id;
073263
!     regprog_T	*regprog;
073263
  
073263
!     if (*grp == NUL || *pat == NUL)
073263
  	return -1;
073263
      if (id < -1 || id == 0)
073263
      {
073263
--- 6751,6772 ----
073263
   * Return ID of added match, -1 on failure.
073263
   */
073263
      int
073263
! match_add(wp, grp, pat, prio, id, pos_list)
073263
      win_T	*wp;
073263
      char_u	*grp;
073263
      char_u	*pat;
073263
      int		prio;
073263
      int		id;
073263
+     list_T	*pos_list;
073263
  {
073263
!     matchitem_T	*cur;
073263
!     matchitem_T	*prev;
073263
!     matchitem_T	*m;
073263
      int		hlg_id;
073263
!     regprog_T	*regprog = NULL;
073263
!     int		rtype = SOME_VALID;
073263
  
073263
!     if (*grp == NUL || (pat != NULL && *pat == NUL))
073263
  	return -1;
073263
      if (id < -1 || id == 0)
073263
      {
073263
***************
073263
*** 6789,6795 ****
073263
  	EMSG2(_(e_nogroup), grp);
073263
  	return -1;
073263
      }
073263
!     if ((regprog = vim_regcomp(pat, RE_MAGIC)) == NULL)
073263
      {
073263
  	EMSG2(_(e_invarg2), pat);
073263
  	return -1;
073263
--- 6791,6797 ----
073263
  	EMSG2(_(e_nogroup), grp);
073263
  	return -1;
073263
      }
073263
!     if (pat != NULL && (regprog = vim_regcomp(pat, RE_MAGIC)) == NULL)
073263
      {
073263
  	EMSG2(_(e_invarg2), pat);
073263
  	return -1;
073263
***************
073263
*** 6810,6821 ****
073263
      m = (matchitem_T *)alloc(sizeof(matchitem_T));
073263
      m->id = id;
073263
      m->priority = prio;
073263
!     m->pattern = vim_strsave(pat);
073263
      m->hlg_id = hlg_id;
073263
      m->match.regprog = regprog;
073263
      m->match.rmm_ic = FALSE;
073263
      m->match.rmm_maxcol = 0;
073263
  
073263
      /* Insert new match.  The match list is in ascending order with regard to
073263
       * the match priorities. */
073263
      cur = wp->w_match_head;
073263
--- 6812,6922 ----
073263
      m = (matchitem_T *)alloc(sizeof(matchitem_T));
073263
      m->id = id;
073263
      m->priority = prio;
073263
!     m->pattern = pat == NULL ? NULL : vim_strsave(pat);
073263
!     m->pos.cur = 0;
073263
      m->hlg_id = hlg_id;
073263
      m->match.regprog = regprog;
073263
      m->match.rmm_ic = FALSE;
073263
      m->match.rmm_maxcol = 0;
073263
  
073263
+     /* Set up position matches */
073263
+     if (pos_list != NULL)
073263
+     {
073263
+ 	linenr_T	toplnum = 0;
073263
+ 	linenr_T	botlnum = 0;
073263
+ 	listitem_T	*li;
073263
+ 	int		i;
073263
+ 
073263
+ 	for (i = 0, li = pos_list->lv_first; i < MAXPOSMATCH;
073263
+ 							i++, li = li->li_next)
073263
+ 	{
073263
+ 	    linenr_T	lnum = 0;
073263
+ 	    colnr_T	col = 0;
073263
+ 	    int		len = 1;
073263
+ 	    list_T	*subl;
073263
+ 	    listitem_T	*subli;
073263
+ 	    int		error;
073263
+ 
073263
+ 	    if (li == NULL)
073263
+ 	    {
073263
+ 		m->pos.pos[i].lnum = 0;
073263
+ 		break;
073263
+ 	    }
073263
+ 	    if (li->li_tv.v_type == VAR_LIST)
073263
+ 	    {
073263
+ 		subl = li->li_tv.vval.v_list;
073263
+ 		if (subl == NULL)
073263
+ 		    goto fail;
073263
+ 		subli = subl->lv_first;
073263
+ 		if (subli == NULL)
073263
+ 		    goto fail;
073263
+ 		lnum = get_tv_number_chk(&subli->li_tv, &error);
073263
+ 		if (error == TRUE)
073263
+ 		    goto fail;
073263
+ 		m->pos.pos[i].lnum = lnum;
073263
+ 		if (lnum == 0)
073263
+ 		{
073263
+ 		    --i;
073263
+ 		    continue;
073263
+ 		}
073263
+ 		subli = subli->li_next;
073263
+ 		if (subli != NULL)
073263
+ 		{
073263
+ 		    col = get_tv_number_chk(&subli->li_tv, &error);
073263
+ 		    if (error == TRUE)
073263
+ 			goto fail;
073263
+ 		    subli = subli->li_next;
073263
+ 		    if (subli != NULL)
073263
+ 		    {
073263
+ 			len = get_tv_number_chk(&subli->li_tv, &error);
073263
+ 			if (error == TRUE)
073263
+ 			    goto fail;
073263
+ 		    }
073263
+ 		}
073263
+ 		m->pos.pos[i].col = col;
073263
+ 		m->pos.pos[i].len = len;
073263
+ 	    }
073263
+ 	    else if (li->li_tv.v_type == VAR_NUMBER)
073263
+ 	    {
073263
+ 		if (li->li_tv.vval.v_number == 0)
073263
+ 		    continue;
073263
+ 		m->pos.pos[i].lnum = li->li_tv.vval.v_number;
073263
+ 		m->pos.pos[i].col = 0;
073263
+ 		m->pos.pos[i].len = 0;
073263
+ 	    }
073263
+ 	    else
073263
+ 	    {
073263
+ 		EMSG(_("List or number required"));
073263
+ 		goto fail;
073263
+ 	    }
073263
+ 	    if (toplnum == 0 || lnum < toplnum)
073263
+ 		toplnum = lnum;
073263
+ 	    if (botlnum == 0 || lnum > botlnum)
073263
+ 		botlnum = lnum;
073263
+ 	}
073263
+ 
073263
+ 	/* Calculate top and bottom lines for redrawing area */
073263
+ 	if (toplnum != 0)
073263
+ 	{
073263
+ 	    if (wp->w_buffer->b_mod_set)
073263
+ 	    {
073263
+ 		if (wp->w_buffer->b_mod_top > toplnum)
073263
+ 		    wp->w_buffer->b_mod_top = toplnum;
073263
+ 		if (wp->w_buffer->b_mod_bot < botlnum)
073263
+ 		    wp->w_buffer->b_mod_bot = botlnum;
073263
+ 	    }
073263
+ 	    else
073263
+ 	    {
073263
+ 		wp->w_buffer->b_mod_top = toplnum;
073263
+ 		wp->w_buffer->b_mod_bot = botlnum;
073263
+ 	    }
073263
+ 	    m->pos.toplnum = toplnum;
073263
+ 	    m->pos.botlnum = botlnum;
073263
+ 	    wp->w_buffer->b_mod_set = TRUE;
073263
+ 	    rtype = VALID;
073263
+ 	}
073263
+     }
073263
+ 
073263
      /* Insert new match.  The match list is in ascending order with regard to
073263
       * the match priorities. */
073263
      cur = wp->w_match_head;
073263
***************
073263
*** 6831,6838 ****
073263
  	prev->next = m;
073263
      m->next = cur;
073263
  
073263
!     redraw_later(SOME_VALID);
073263
      return id;
073263
  }
073263
  
073263
  /*
073263
--- 6932,6943 ----
073263
  	prev->next = m;
073263
      m->next = cur;
073263
  
073263
!     redraw_later(rtype);
073263
      return id;
073263
+ 
073263
+ fail:
073263
+     vim_free(m);
073263
+     return -1;
073263
  }
073263
  
073263
  /*
073263
***************
073263
*** 6845,6852 ****
073263
      int		id;
073263
      int		perr;
073263
  {
073263
!     matchitem_T *cur = wp->w_match_head;
073263
!     matchitem_T *prev = cur;
073263
  
073263
      if (id < 1)
073263
      {
073263
--- 6950,6958 ----
073263
      int		id;
073263
      int		perr;
073263
  {
073263
!     matchitem_T	*cur = wp->w_match_head;
073263
!     matchitem_T	*prev = cur;
073263
!     int		rtype = SOME_VALID;
073263
  
073263
      if (id < 1)
073263
      {
073263
***************
073263
*** 6872,6879 ****
073263
  	prev->next = cur->next;
073263
      vim_regfree(cur->match.regprog);
073263
      vim_free(cur->pattern);
073263
      vim_free(cur);
073263
!     redraw_later(SOME_VALID);
073263
      return 0;
073263
  }
073263
  
073263
--- 6978,7002 ----
073263
  	prev->next = cur->next;
073263
      vim_regfree(cur->match.regprog);
073263
      vim_free(cur->pattern);
073263
+     if (cur->pos.toplnum != 0)
073263
+     {
073263
+ 	if (wp->w_buffer->b_mod_set)
073263
+ 	{
073263
+ 	    if (wp->w_buffer->b_mod_top > cur->pos.toplnum)
073263
+ 		wp->w_buffer->b_mod_top = cur->pos.toplnum;
073263
+ 	    if (wp->w_buffer->b_mod_bot < cur->pos.botlnum)
073263
+ 		wp->w_buffer->b_mod_bot = cur->pos.botlnum;
073263
+ 	}
073263
+ 	else
073263
+ 	{
073263
+ 	    wp->w_buffer->b_mod_top = cur->pos.toplnum;
073263
+ 	    wp->w_buffer->b_mod_bot = cur->pos.botlnum;
073263
+ 	}
073263
+ 	wp->w_buffer->b_mod_set = TRUE;
073263
+ 	rtype = VALID;
073263
+     }
073263
      vim_free(cur);
073263
!     redraw_later(rtype);
073263
      return 0;
073263
  }
073263
  
073263
*** ../vim-7.4.329/src/version.c	2014-06-17 13:52:35.868092848 +0200
073263
--- src/version.c	2014-06-17 14:11:53.764136653 +0200
073263
***************
073263
*** 736,737 ****
073263
--- 736,739 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     330,
073263
  /**/
073263
073263
-- 
073263
I'd like to meet the man who invented sex and see what he's working on now.
073263
073263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
073263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
073263
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
073263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///