Karsten Hopp 26d848
To: vim-dev@vim.org
Karsten Hopp 26d848
Subject: patch 7.1.036
Karsten Hopp 26d848
Fcc: outbox
Karsten Hopp 26d848
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 26d848
Mime-Version: 1.0
Karsten Hopp 26d848
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 26d848
Content-Transfer-Encoding: 8bit
Karsten Hopp 26d848
------------
Karsten Hopp 26d848
Karsten Hopp 26d848
Patch 7.1.036
Karsten Hopp 26d848
Problem:    Completing ":echohl" argument should include "None". (Ori
Karsten Hopp 26d848
	    Avtalion)  ":match" should have "none" too.
Karsten Hopp 26d848
Solution:   Add flags to use expand_highlight().  Also fix that when disabling
Karsten Hopp 26d848
	    FEAT_CMDL_COMPL compilation fails.  (Chris Lubinski)
Karsten Hopp 26d848
Files:	    src/eval.c, src/ex_docmd.c, src/ex_getln.c, src/proto/syntax.pro
Karsten Hopp 26d848
	    src/syntax.c
Karsten Hopp 26d848
Karsten Hopp 26d848
Karsten Hopp 26d848
*** ../vim-7.1.035/src/eval.c	Tue Jul 24 10:44:10 2007
Karsten Hopp 26d848
--- src/eval.c	Wed Jul 11 19:50:27 2007
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 1411,1417 ****
Karsten Hopp 26d848
  }
Karsten Hopp 26d848
  
Karsten Hopp 26d848
  
Karsten Hopp 26d848
! #if (defined(FEAT_USR_CMDS) && defined(FEAT_CMDL_COMPL)) || defined(PROTO)
Karsten Hopp 26d848
  /*
Karsten Hopp 26d848
   * Call some vimL function and return the result in "*rettv".
Karsten Hopp 26d848
   * Uses argv[argc] for the function arguments.
Karsten Hopp 26d848
--- 1411,1418 ----
Karsten Hopp 26d848
  }
Karsten Hopp 26d848
  
Karsten Hopp 26d848
  
Karsten Hopp 26d848
! #if (defined(FEAT_USR_CMDS) && defined(FEAT_CMDL_COMPL)) \
Karsten Hopp 26d848
! 	|| defined(FEAT_COMPL_FUNC) || defined(PROTO)
Karsten Hopp 26d848
  /*
Karsten Hopp 26d848
   * Call some vimL function and return the result in "*rettv".
Karsten Hopp 26d848
   * Uses argv[argc] for the function arguments.
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 1484,1489 ****
Karsten Hopp 26d848
--- 1485,1491 ----
Karsten Hopp 26d848
      return ret;
Karsten Hopp 26d848
  }
Karsten Hopp 26d848
  
Karsten Hopp 26d848
+ # if (defined(FEAT_USR_CMDS) && defined(FEAT_CMDL_COMPL)) || defined(PROTO)
Karsten Hopp 26d848
  /*
Karsten Hopp 26d848
   * Call vimL function "func" and return the result as a string.
Karsten Hopp 26d848
   * Returns NULL when calling the function fails.
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 1506,1513 ****
Karsten Hopp 26d848
      clear_tv(&rettv);
Karsten Hopp 26d848
      return retval;
Karsten Hopp 26d848
  }
Karsten Hopp 26d848
  
Karsten Hopp 26d848
! #if defined(FEAT_COMPL_FUNC) || defined(PROTO)
Karsten Hopp 26d848
  /*
Karsten Hopp 26d848
   * Call vimL function "func" and return the result as a number.
Karsten Hopp 26d848
   * Returns -1 when calling the function fails.
Karsten Hopp 26d848
--- 1508,1516 ----
Karsten Hopp 26d848
      clear_tv(&rettv);
Karsten Hopp 26d848
      return retval;
Karsten Hopp 26d848
  }
Karsten Hopp 26d848
+ # endif
Karsten Hopp 26d848
  
Karsten Hopp 26d848
! # if defined(FEAT_COMPL_FUNC) || defined(PROTO)
Karsten Hopp 26d848
  /*
Karsten Hopp 26d848
   * Call vimL function "func" and return the result as a number.
Karsten Hopp 26d848
   * Returns -1 when calling the function fails.
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 1530,1536 ****
Karsten Hopp 26d848
      clear_tv(&rettv);
Karsten Hopp 26d848
      return retval;
Karsten Hopp 26d848
  }
Karsten Hopp 26d848
! #endif
Karsten Hopp 26d848
  
Karsten Hopp 26d848
  /*
Karsten Hopp 26d848
   * Call vimL function "func" and return the result as a list
Karsten Hopp 26d848
--- 1533,1539 ----
Karsten Hopp 26d848
      clear_tv(&rettv);
Karsten Hopp 26d848
      return retval;
Karsten Hopp 26d848
  }
Karsten Hopp 26d848
! # endif
Karsten Hopp 26d848
  
Karsten Hopp 26d848
  /*
Karsten Hopp 26d848
   * Call vimL function "func" and return the result as a list
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 1556,1563 ****
Karsten Hopp 26d848
  
Karsten Hopp 26d848
      return rettv.vval.v_list;
Karsten Hopp 26d848
  }
Karsten Hopp 26d848
- 
Karsten Hopp 26d848
  #endif
Karsten Hopp 26d848
  
Karsten Hopp 26d848
  /*
Karsten Hopp 26d848
   * Save the current function call pointer, and set it to NULL.
Karsten Hopp 26d848
--- 1559,1566 ----
Karsten Hopp 26d848
  
Karsten Hopp 26d848
      return rettv.vval.v_list;
Karsten Hopp 26d848
  }
Karsten Hopp 26d848
  #endif
Karsten Hopp 26d848
+ 
Karsten Hopp 26d848
  
Karsten Hopp 26d848
  /*
Karsten Hopp 26d848
   * Save the current function call pointer, and set it to NULL.
Karsten Hopp 26d848
*** ../vim-7.1.035/src/ex_docmd.c	Mon Jul 16 20:38:56 2007
Karsten Hopp 26d848
--- src/ex_docmd.c	Sun Jul 15 17:20:09 2007
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 3406,3419 ****
Karsten Hopp 26d848
  	case CMD_windo:
Karsten Hopp 26d848
  	    return arg;
Karsten Hopp 26d848
  
Karsten Hopp 26d848
! #ifdef FEAT_SEARCH_EXTRA
Karsten Hopp 26d848
  	case CMD_match:
Karsten Hopp 26d848
  	    if (*arg == NUL || !ends_excmd(*arg))
Karsten Hopp 26d848
  	    {
Karsten Hopp 26d848
! 		/* Dummy call to clear variables. */
Karsten Hopp 26d848
! 		set_context_in_highlight_cmd(xp, (char_u *)"link n");
Karsten Hopp 26d848
! 		xp->xp_context = EXPAND_HIGHLIGHT;
Karsten Hopp 26d848
! 		xp->xp_pattern = arg;
Karsten Hopp 26d848
  		arg = skipwhite(skiptowhite(arg));
Karsten Hopp 26d848
  		if (*arg != NUL)
Karsten Hopp 26d848
  		{
Karsten Hopp 26d848
--- 3406,3418 ----
Karsten Hopp 26d848
  	case CMD_windo:
Karsten Hopp 26d848
  	    return arg;
Karsten Hopp 26d848
  
Karsten Hopp 26d848
! #ifdef FEAT_CMDL_COMPL
Karsten Hopp 26d848
! # ifdef FEAT_SEARCH_EXTRA
Karsten Hopp 26d848
  	case CMD_match:
Karsten Hopp 26d848
  	    if (*arg == NUL || !ends_excmd(*arg))
Karsten Hopp 26d848
  	    {
Karsten Hopp 26d848
! 		/* also complete "None" */
Karsten Hopp 26d848
! 		set_context_in_echohl_cmd(xp, arg);
Karsten Hopp 26d848
  		arg = skipwhite(skiptowhite(arg));
Karsten Hopp 26d848
  		if (*arg != NUL)
Karsten Hopp 26d848
  		{
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 3422,3430 ****
Karsten Hopp 26d848
  		}
Karsten Hopp 26d848
  	    }
Karsten Hopp 26d848
  	    return find_nextcmd(arg);
Karsten Hopp 26d848
! #endif
Karsten Hopp 26d848
  
Karsten Hopp 26d848
- #ifdef FEAT_CMDL_COMPL
Karsten Hopp 26d848
  /*
Karsten Hopp 26d848
   * All completion for the +cmdline_compl feature goes here.
Karsten Hopp 26d848
   */
Karsten Hopp 26d848
--- 3421,3428 ----
Karsten Hopp 26d848
  		}
Karsten Hopp 26d848
  	    }
Karsten Hopp 26d848
  	    return find_nextcmd(arg);
Karsten Hopp 26d848
! # endif
Karsten Hopp 26d848
  
Karsten Hopp 26d848
  /*
Karsten Hopp 26d848
   * All completion for the +cmdline_compl feature goes here.
Karsten Hopp 26d848
   */
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 3622,3629 ****
Karsten Hopp 26d848
  	    break;
Karsten Hopp 26d848
  
Karsten Hopp 26d848
  	case CMD_echohl:
Karsten Hopp 26d848
! 	    xp->xp_context = EXPAND_HIGHLIGHT;
Karsten Hopp 26d848
! 	    xp->xp_pattern = arg;
Karsten Hopp 26d848
  	    break;
Karsten Hopp 26d848
  #endif
Karsten Hopp 26d848
  	case CMD_highlight:
Karsten Hopp 26d848
--- 3620,3626 ----
Karsten Hopp 26d848
  	    break;
Karsten Hopp 26d848
  
Karsten Hopp 26d848
  	case CMD_echohl:
Karsten Hopp 26d848
! 	    set_context_in_echohl_cmd(xp, arg);
Karsten Hopp 26d848
  	    break;
Karsten Hopp 26d848
  #endif
Karsten Hopp 26d848
  	case CMD_highlight:
Karsten Hopp 26d848
*** ../vim-7.1.035/src/ex_getln.c	Tue Jul 17 18:14:14 2007
Karsten Hopp 26d848
--- src/ex_getln.c	Tue Jul 17 18:05:49 2007
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 268,274 ****
Karsten Hopp 26d848
--- 268,276 ----
Karsten Hopp 26d848
      {
Karsten Hopp 26d848
  	xpc.xp_context = ccline.xp_context;
Karsten Hopp 26d848
  	xpc.xp_pattern = ccline.cmdbuff;
Karsten Hopp 26d848
+ # if defined(FEAT_USR_CMDS) && defined(FEAT_CMDL_COMPL)
Karsten Hopp 26d848
  	xpc.xp_arg = ccline.xp_arg;
Karsten Hopp 26d848
+ # endif
Karsten Hopp 26d848
      }
Karsten Hopp 26d848
  #endif
Karsten Hopp 26d848
  
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 4151,4163 ****
Karsten Hopp 26d848
--- 4153,4171 ----
Karsten Hopp 26d848
  
Karsten Hopp 26d848
  #ifdef FEAT_EVAL
Karsten Hopp 26d848
      if (ccline.cmdfirstc == '=')
Karsten Hopp 26d848
+     {
Karsten Hopp 26d848
+ # ifdef FEAT_CMDL_COMPL
Karsten Hopp 26d848
  	/* pass CMD_SIZE because there is no real command */
Karsten Hopp 26d848
  	set_context_for_expression(xp, str, CMD_SIZE);
Karsten Hopp 26d848
+ # endif
Karsten Hopp 26d848
+     }
Karsten Hopp 26d848
      else if (ccline.input_fn)
Karsten Hopp 26d848
      {
Karsten Hopp 26d848
  	xp->xp_context = ccline.xp_context;
Karsten Hopp 26d848
  	xp->xp_pattern = ccline.cmdbuff;
Karsten Hopp 26d848
+ # if defined(FEAT_USR_CMDS) && defined(FEAT_CMDL_COMPL)
Karsten Hopp 26d848
  	xp->xp_arg = ccline.xp_arg;
Karsten Hopp 26d848
+ # endif
Karsten Hopp 26d848
      }
Karsten Hopp 26d848
      else
Karsten Hopp 26d848
  #endif
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 4504,4509 ****
Karsten Hopp 26d848
--- 4512,4523 ----
Karsten Hopp 26d848
      /* Sort the results.  Keep menu's in the specified order. */
Karsten Hopp 26d848
      if (xp->xp_context != EXPAND_MENUNAMES && xp->xp_context != EXPAND_MENUS)
Karsten Hopp 26d848
  	sort_strings(*file, *num_file);
Karsten Hopp 26d848
+ 
Karsten Hopp 26d848
+ #ifdef FEAT_CMDL_COMPL
Karsten Hopp 26d848
+     /* Reset the variables used for special highlight names expansion, so that
Karsten Hopp 26d848
+      * they don't show up when getting normal highlight names by ID. */
Karsten Hopp 26d848
+     reset_expand_highlight();
Karsten Hopp 26d848
+ #endif
Karsten Hopp 26d848
  
Karsten Hopp 26d848
      return OK;
Karsten Hopp 26d848
  }
Karsten Hopp 26d848
*** ../vim-7.1.035/src/proto/syntax.pro	Sat May  5 19:23:52 2007
Karsten Hopp 26d848
--- src/proto/syntax.pro	Fri Jul 13 19:51:43 2007
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 8,13 ****
Karsten Hopp 26d848
--- 8,15 ----
Karsten Hopp 26d848
  void syntax_clear __ARGS((buf_T *buf));
Karsten Hopp 26d848
  void ex_syntax __ARGS((exarg_T *eap));
Karsten Hopp 26d848
  int syntax_present __ARGS((buf_T *buf));
Karsten Hopp 26d848
+ void reset_expand_highlight __ARGS((void));
Karsten Hopp 26d848
+ void set_context_in_echohl_cmd __ARGS((expand_T *xp, char_u *arg));
Karsten Hopp 26d848
  void set_context_in_syntax_cmd __ARGS((expand_T *xp, char_u *arg));
Karsten Hopp 26d848
  char_u *get_syntax_name __ARGS((expand_T *xp, int idx));
Karsten Hopp 26d848
  int syn_get_id __ARGS((win_T *wp, long lnum, colnr_T col, int trans, int *spellp));
Karsten Hopp 26d848
*** ../vim-7.1.035/src/syntax.c	Thu Jun 28 11:59:13 2007
Karsten Hopp 26d848
--- src/syntax.c	Fri Jul 13 19:51:39 2007
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 66,73 ****
Karsten Hopp 26d848
  #define HL_TABLE() ((struct hl_group *)((highlight_ga.ga_data)))
Karsten Hopp 26d848
  
Karsten Hopp 26d848
  #ifdef FEAT_CMDL_COMPL
Karsten Hopp 26d848
! static int include_default = FALSE;	/* include "default" for expansion */
Karsten Hopp 26d848
! static int include_link = FALSE;	/* include "link" for expansion */
Karsten Hopp 26d848
  #endif
Karsten Hopp 26d848
  
Karsten Hopp 26d848
  /*
Karsten Hopp 26d848
--- 66,75 ----
Karsten Hopp 26d848
  #define HL_TABLE() ((struct hl_group *)((highlight_ga.ga_data)))
Karsten Hopp 26d848
  
Karsten Hopp 26d848
  #ifdef FEAT_CMDL_COMPL
Karsten Hopp 26d848
! /* Flags to indicate an additional string for highlight name completion. */
Karsten Hopp 26d848
! static int include_none = 0;	/* when 1 include "None" */
Karsten Hopp 26d848
! static int include_default = 0;	/* when 1 include "default" */
Karsten Hopp 26d848
! static int include_link = 0;	/* when 2 include "link" and "clear" */
Karsten Hopp 26d848
  #endif
Karsten Hopp 26d848
  
Karsten Hopp 26d848
  /*
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 5968,5973 ****
Karsten Hopp 26d848
--- 5970,5998 ----
Karsten Hopp 26d848
      EXP_CASE	    /* expand ":syn case" arguments */
Karsten Hopp 26d848
  } expand_what;
Karsten Hopp 26d848
  
Karsten Hopp 26d848
+ /*
Karsten Hopp 26d848
+  * Reset include_link, include_default, include_none to 0.
Karsten Hopp 26d848
+  * Called when we are done expanding.
Karsten Hopp 26d848
+  */
Karsten Hopp 26d848
+     void
Karsten Hopp 26d848
+ reset_expand_highlight()
Karsten Hopp 26d848
+ {
Karsten Hopp 26d848
+     include_link = include_default = include_none = 0;
Karsten Hopp 26d848
+ }
Karsten Hopp 26d848
+ 
Karsten Hopp 26d848
+ /*
Karsten Hopp 26d848
+  * Handle command line completion for :match and :echohl command: Add "None"
Karsten Hopp 26d848
+  * as highlight group.
Karsten Hopp 26d848
+  */
Karsten Hopp 26d848
+     void
Karsten Hopp 26d848
+ set_context_in_echohl_cmd(xp, arg)
Karsten Hopp 26d848
+     expand_T	*xp;
Karsten Hopp 26d848
+     char_u	*arg;
Karsten Hopp 26d848
+ {
Karsten Hopp 26d848
+     xp->xp_context = EXPAND_HIGHLIGHT;
Karsten Hopp 26d848
+     xp->xp_pattern = arg;
Karsten Hopp 26d848
+     include_none = 1;
Karsten Hopp 26d848
+ }
Karsten Hopp 26d848
  
Karsten Hopp 26d848
  /*
Karsten Hopp 26d848
   * Handle command line completion for :syntax command.
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 5983,5990 ****
Karsten Hopp 26d848
      xp->xp_context = EXPAND_SYNTAX;
Karsten Hopp 26d848
      expand_what = EXP_SUBCMD;
Karsten Hopp 26d848
      xp->xp_pattern = arg;
Karsten Hopp 26d848
!     include_link = FALSE;
Karsten Hopp 26d848
!     include_default = FALSE;
Karsten Hopp 26d848
  
Karsten Hopp 26d848
      /* (part of) subcommand already typed */
Karsten Hopp 26d848
      if (*arg != NUL)
Karsten Hopp 26d848
--- 6008,6015 ----
Karsten Hopp 26d848
      xp->xp_context = EXPAND_SYNTAX;
Karsten Hopp 26d848
      expand_what = EXP_SUBCMD;
Karsten Hopp 26d848
      xp->xp_pattern = arg;
Karsten Hopp 26d848
!     include_link = 0;
Karsten Hopp 26d848
!     include_default = 0;
Karsten Hopp 26d848
  
Karsten Hopp 26d848
      /* (part of) subcommand already typed */
Karsten Hopp 26d848
      if (*arg != NUL)
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 8949,8955 ****
Karsten Hopp 26d848
      return OK;
Karsten Hopp 26d848
  }
Karsten Hopp 26d848
  
Karsten Hopp 26d848
! #ifdef FEAT_CMDL_COMPL
Karsten Hopp 26d848
  
Karsten Hopp 26d848
  static void highlight_list __ARGS((void));
Karsten Hopp 26d848
  static void highlight_list_two __ARGS((int cnt, int attr));
Karsten Hopp 26d848
--- 8974,8980 ----
Karsten Hopp 26d848
      return OK;
Karsten Hopp 26d848
  }
Karsten Hopp 26d848
  
Karsten Hopp 26d848
! #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
Karsten Hopp 26d848
  
Karsten Hopp 26d848
  static void highlight_list __ARGS((void));
Karsten Hopp 26d848
  static void highlight_list_two __ARGS((int cnt, int attr));
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 8967,8974 ****
Karsten Hopp 26d848
      /* Default: expand group names */
Karsten Hopp 26d848
      xp->xp_context = EXPAND_HIGHLIGHT;
Karsten Hopp 26d848
      xp->xp_pattern = arg;
Karsten Hopp 26d848
!     include_link = TRUE;
Karsten Hopp 26d848
!     include_default = TRUE;
Karsten Hopp 26d848
  
Karsten Hopp 26d848
      /* (part of) subcommand already typed */
Karsten Hopp 26d848
      if (*arg != NUL)
Karsten Hopp 26d848
--- 8992,8999 ----
Karsten Hopp 26d848
      /* Default: expand group names */
Karsten Hopp 26d848
      xp->xp_context = EXPAND_HIGHLIGHT;
Karsten Hopp 26d848
      xp->xp_pattern = arg;
Karsten Hopp 26d848
!     include_link = 2;
Karsten Hopp 26d848
!     include_default = 1;
Karsten Hopp 26d848
  
Karsten Hopp 26d848
      /* (part of) subcommand already typed */
Karsten Hopp 26d848
      if (*arg != NUL)
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 8976,8982 ****
Karsten Hopp 26d848
  	p = skiptowhite(arg);
Karsten Hopp 26d848
  	if (*p != NUL)			/* past "default" or group name */
Karsten Hopp 26d848
  	{
Karsten Hopp 26d848
! 	    include_default = FALSE;
Karsten Hopp 26d848
  	    if (STRNCMP("default", arg, p - arg) == 0)
Karsten Hopp 26d848
  	    {
Karsten Hopp 26d848
  		arg = skipwhite(p);
Karsten Hopp 26d848
--- 9001,9007 ----
Karsten Hopp 26d848
  	p = skiptowhite(arg);
Karsten Hopp 26d848
  	if (*p != NUL)			/* past "default" or group name */
Karsten Hopp 26d848
  	{
Karsten Hopp 26d848
! 	    include_default = 0;
Karsten Hopp 26d848
  	    if (STRNCMP("default", arg, p - arg) == 0)
Karsten Hopp 26d848
  	    {
Karsten Hopp 26d848
  		arg = skipwhite(p);
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 8985,8991 ****
Karsten Hopp 26d848
  	    }
Karsten Hopp 26d848
  	    if (*p != NUL)			/* past group name */
Karsten Hopp 26d848
  	    {
Karsten Hopp 26d848
! 		include_link = FALSE;
Karsten Hopp 26d848
  		if (arg[1] == 'i' && arg[0] == 'N')
Karsten Hopp 26d848
  		    highlight_list();
Karsten Hopp 26d848
  		if (STRNCMP("link", arg, p - arg) == 0
Karsten Hopp 26d848
--- 9010,9016 ----
Karsten Hopp 26d848
  	    }
Karsten Hopp 26d848
  	    if (*p != NUL)			/* past group name */
Karsten Hopp 26d848
  	    {
Karsten Hopp 26d848
! 		include_link = 0;
Karsten Hopp 26d848
  		if (arg[1] == 'i' && arg[0] == 'N')
Karsten Hopp 26d848
  		    highlight_list();
Karsten Hopp 26d848
  		if (STRNCMP("link", arg, p - arg) == 0
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 9045,9075 ****
Karsten Hopp 26d848
      expand_T	*xp;
Karsten Hopp 26d848
      int		idx;
Karsten Hopp 26d848
  {
Karsten Hopp 26d848
-     if (idx == highlight_ga.ga_len
Karsten Hopp 26d848
  #ifdef FEAT_CMDL_COMPL
Karsten Hopp 26d848
! 	    && include_link
Karsten Hopp 26d848
! #endif
Karsten Hopp 26d848
! 	    )
Karsten Hopp 26d848
  	return (char_u *)"link";
Karsten Hopp 26d848
!     if (idx == highlight_ga.ga_len + 1
Karsten Hopp 26d848
! #ifdef FEAT_CMDL_COMPL
Karsten Hopp 26d848
! 	    && include_link
Karsten Hopp 26d848
! #endif
Karsten Hopp 26d848
! 	    )
Karsten Hopp 26d848
  	return (char_u *)"clear";
Karsten Hopp 26d848
-     if (idx == highlight_ga.ga_len + 2
Karsten Hopp 26d848
- #ifdef FEAT_CMDL_COMPL
Karsten Hopp 26d848
- 	    && include_default
Karsten Hopp 26d848
  #endif
Karsten Hopp 26d848
- 	    )
Karsten Hopp 26d848
- 	return (char_u *)"default";
Karsten Hopp 26d848
      if (idx < 0 || idx >= highlight_ga.ga_len)
Karsten Hopp 26d848
  	return NULL;
Karsten Hopp 26d848
      return HL_TABLE()[idx].sg_name;
Karsten Hopp 26d848
  }
Karsten Hopp 26d848
  #endif
Karsten Hopp 26d848
  
Karsten Hopp 26d848
! #ifdef FEAT_GUI
Karsten Hopp 26d848
  /*
Karsten Hopp 26d848
   * Free all the highlight group fonts.
Karsten Hopp 26d848
   * Used when quitting for systems which need it.
Karsten Hopp 26d848
--- 9070,9094 ----
Karsten Hopp 26d848
      expand_T	*xp;
Karsten Hopp 26d848
      int		idx;
Karsten Hopp 26d848
  {
Karsten Hopp 26d848
  #ifdef FEAT_CMDL_COMPL
Karsten Hopp 26d848
!     if (idx == highlight_ga.ga_len && include_none != 0)
Karsten Hopp 26d848
! 	return (char_u *)"none";
Karsten Hopp 26d848
!     if (idx == highlight_ga.ga_len + include_none && include_default != 0)
Karsten Hopp 26d848
! 	return (char_u *)"default";
Karsten Hopp 26d848
!     if (idx == highlight_ga.ga_len + include_none + include_default
Karsten Hopp 26d848
! 							 && include_link != 0)
Karsten Hopp 26d848
  	return (char_u *)"link";
Karsten Hopp 26d848
!     if (idx == highlight_ga.ga_len + include_none + include_default + 1
Karsten Hopp 26d848
! 							 && include_link != 0)
Karsten Hopp 26d848
  	return (char_u *)"clear";
Karsten Hopp 26d848
  #endif
Karsten Hopp 26d848
      if (idx < 0 || idx >= highlight_ga.ga_len)
Karsten Hopp 26d848
  	return NULL;
Karsten Hopp 26d848
      return HL_TABLE()[idx].sg_name;
Karsten Hopp 26d848
  }
Karsten Hopp 26d848
  #endif
Karsten Hopp 26d848
  
Karsten Hopp 26d848
! #if defined(FEAT_GUI) || defined(PROTO)
Karsten Hopp 26d848
  /*
Karsten Hopp 26d848
   * Free all the highlight group fonts.
Karsten Hopp 26d848
   * Used when quitting for systems which need it.
Karsten Hopp 26d848
*** ../vim-7.1.035/src/version.c	Tue Jul 24 11:15:46 2007
Karsten Hopp 26d848
--- src/version.c	Tue Jul 24 14:30:18 2007
Karsten Hopp 26d848
***************
Karsten Hopp 26d848
*** 668,669 ****
Karsten Hopp 26d848
--- 668,671 ----
Karsten Hopp 26d848
  {   /* Add new patch number below this line */
Karsten Hopp 26d848
+ /**/
Karsten Hopp 26d848
+     36,
Karsten Hopp 26d848
  /**/
Karsten Hopp 26d848
Karsten Hopp 26d848
-- 
Karsten Hopp 26d848
Apparently, 1 in 5 people in the world are Chinese.  And there are 5
Karsten Hopp 26d848
people in my family, so it must be one of them.  It's either my mum
Karsten Hopp 26d848
or my dad.  Or my older brother Colin.  Or my younger brother
Karsten Hopp 26d848
Ho-Cha-Chu.  But I think it's Colin.
Karsten Hopp 26d848
Karsten Hopp 26d848
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 26d848
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 26d848
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 26d848
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///