Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: experimental new style completion



While working on my last patch I found a bug: completion inside
`((...))' reported a wrong CONTEXT.

Bye
 Sven

*** Src/Zle/zle_tricky.c.old	Thu Jan 21 11:48:50 1999
--- Src/Zle/zle_tricky.c	Thu Jan 21 11:49:06 1999
***************
*** 3240,3246 ****
  		zsfree(compcontext);
  		zsfree(compcommand);
  		compcommand = "";
! 		if (lincmd)
  		    compcontext = (insubscr ? "subscript" : "command");
  		else if (linredir)
  		    compcontext = "redirect";
--- 3240,3253 ----
  		zsfree(compcontext);
  		zsfree(compcommand);
  		compcommand = "";
! 		if (inwhat == IN_MATH) {
! 		    if (insubscr) {
! 			compcontext = "subscript";
! 			compcommand = varname ? varname : "";
! 		    } else
! 			compcontext = "math";
! 		    usea = 0;
! 		} else if (lincmd)
  		    compcontext = (insubscr ? "subscript" : "command");
  		else if (linredir)
  		    compcontext = "redirect";
***************
*** 3249,3262 ****
  		    case IN_ENV:
  			compcontext = "value";
  			compcommand = varname;
- 			usea = 0;
- 			break;
- 		    case IN_MATH:
- 			if (insubscr) {
- 			    compcontext = "subscript";
- 			    compcommand = varname ? varname : "";
- 			} else
- 			    compcontext = "math";
  			usea = 0;
  			break;
  		    case IN_COND:
--- 3256,3261 ----

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author