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

Should I commit 29049 ?



I never did so because I'm not sure it's really doing the right thing.
IIRC (which I may not) the problem here is that we've exited and re-
entered the line editor, which means the call stack isn't useful for
saving/restoring the state, so this is attempting to cobble it up from
globals.  But maybe there's a better way.  In particular I think some
testing while I was preparing to commit revealed that this sometimes
backs out too much, but I didn't get a good set of steps to reproduce.

} I think this is almost right -- origll should probably be set to
} minfo.pos rather than minfo.end, and to be thorough there probably
} ought to be an "else" for the case where minfo.cur is NULL (but I
} suspect it's not possible for that to happen).
} 
} 
} Index: Src/Zle/complist.c
} ===================================================================
} --- complist.c	21 Dec 2010 16:41:16 -0000
} +++ complist.c	26 Apr 2011 00:48:39 -0000
} @@ -2390,8 +2390,19 @@
}      else {
}  	wasmeta = 0;
}  	metafy_line();
} +	if (minfo.cur) {
} +	  /* Restore state when menu completion began */
} +	  origline = dupstrpfx(zlemetaline, minfo.pos);
} +	  origcs = minfo.pos;
} +	  origll = minfo.pos;
} +	} else {
} +	  /* This branch may be unreachable */
} +	  origline = dupstring(zlemetaline);
} +	  origcs = zlemetacs;
} +	  origll = zlemetall;
} +	}
}      }
} -    
} +
}      if ((s = getsparam("MENUSCROLL"))) {
}  	if (!(step = mathevali(s)))
}  	    step = (lines - nlnct) >> 1;



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