zsh-workers
 help / color / mirror / code / Atom feed
* completion or refresh bug?
@ 1997-01-10 13:39 Peter Stephenson
  1997-01-11 22:53 ` Zoltan Hidvegi
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Stephenson @ 1997-01-10 13:39 UTC (permalink / raw)
  To: Zsh hackers list

This is happening with an ordinary xterm in 3.0.3-test3; it exists at
least back to 3.0.2-test2.  I doubt it's terminal dependent; it still
appears if you tell the shell the xterm is a vt100.

% zsh -f
% compctl -D -f + -X '(No file found; using history)' -H 0 ''
% echo *,ps<TAB>

(that should have been *.ps, of course) becomes:

% echo \*.ps^@
(No file found; using history)
% echo \*,ps

the only problem is the extraneous ^@.  With alwayslastprompt, it
appears right under the cursor.  It goes when you type ^L.

The ^@ does not appear when the -X message is removed.  However,
in that case the * does not get backslashed; one of the alternatives
is presumably also a bug.

-- 
Peter Stephenson <pws@ifh.de>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77413
Deutsches Elektronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: completion or refresh bug?
  1997-01-10 13:39 completion or refresh bug? Peter Stephenson
@ 1997-01-11 22:53 ` Zoltan Hidvegi
  0 siblings, 0 replies; 2+ messages in thread
From: Zoltan Hidvegi @ 1997-01-11 22:53 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-workers

> This is happening with an ordinary xterm in 3.0.3-test3; it exists at
> least back to 3.0.2-test2.  I doubt it's terminal dependent; it still
> appears if you tell the shell the xterm is a vt100.
> 
> % zsh -f
> % compctl -D -f + -X '(No file found; using history)' -H 0 ''
> % echo *,ps<TAB>
> 
> (that should have been *.ps, of course) becomes:
> 
> % echo \*.ps^@
> (No file found; using history)
> % echo \*,ps
> 
> the only problem is the extraneous ^@.  With alwayslastprompt, it
> appears right under the cursor.  It goes when you type ^L.

That patch below fixes that.

> The ^@ does not appear when the -X message is removed.  However,
> in that case the * does not get backslashed; one of the alternatives
> is presumably also a bug.

I think I know the cause and I'm not sure it is a bug.  I'll check.

Zoltan


*** Src/Zle/zle_tricky.c	1997/01/07 16:42:24	3.1.1.9
--- Src/Zle/zle_tricky.c	1997/01/11 22:41:02
***************
*** 2169,2175 ****
  makecomplist(char *s, int incmd, int *delit, int *compadd, int untokenized)
  {
      Compctl cc = NULL;
!     int oloffs = offs, owe = we, owb = wb, ocs = cs, isf = 1;
      int t, sf1, sf2, ooffs;
      char *p, *sd = NULL, *tt, *s1, *s2, *os = NULL;
      unsigned char *ol = NULL;
--- 2169,2175 ----
  makecomplist(char *s, int incmd, int *delit, int *compadd, int untokenized)
  {
      Compctl cc = NULL;
!     int oloffs = offs, owe = we, owb = wb, ocs = cs, oll = ll, isf = 1;
      int t, sf1, sf2, ooffs;
      char *p, *sd = NULL, *tt, *s1, *s2, *os = NULL;
      unsigned char *ol = NULL;
***************
*** 2184,2189 ****
--- 2184,2191 ----
  
    xorrec:
  
+     DPUTS(ll != strlen((char *) line), "BUG: xorrec: ll != strlen(line)");
+ 
      /* Go to the end of the word if complete_in_word is not set. */
      if (unset(COMPLETEINWORD) && cs != we)
  	cs = we, offs = strlen(s);
***************
*** 2923,2928 ****
--- 2925,2931 ----
  	wb = owb;
  	we = owe;
  	cs = ocs;
+ 	ll = oll;
  	strcpy((char *)line, (char *)ol);
  	offs = oloffs;
  	s = dupstring(os);


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-01-11 22:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-01-10 13:39 completion or refresh bug? Peter Stephenson
1997-01-11 22:53 ` Zoltan Hidvegi

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).