* Autoremoveslash bug?
@ 1998-10-05 5:27 Tanaka Akira
1998-10-05 9:41 ` Bart Schaefer
0 siblings, 1 reply; 4+ messages in thread
From: Tanaka Akira @ 1998-10-05 5:27 UTC (permalink / raw)
To: zsh-workers
Hi. I'm using zsh-3.1.4 on Solaris-2.6.
I found a small bug with automenu.
% zsh -f
crane% cd /tmp
crane% mkdir tst
crane% touch tst/abc
crane% touch tst/abcdef
crane% echo tst
press <TAB>
crane% echo tst/
press <TAB>
crane% echo tst/abc
press <Return>
crane% echo tst/ab
tst/ab
crane%
So, zsh deletes a last character.
Following fix works for me.
Is this correct?
------------------------------------------------------------
--- zle_tricky.c.org Mon Oct 5 06:12:39 1998
+++ zle_tricky.c Mon Oct 5 08:16:01 1998
@@ -3269,7 +3269,10 @@
if(ae && !atend)
inststrlen(firstm + strlen(firstm) - ae, 0, ae);
if(ab || (ae && !atend))
+ {
+ makesuffix(menuinsc = 0);
inv = 1;
+ }
/* If the LIST_AMBIGUOUS option (meaning roughly `show a list only *
* if the completion is completely ambiguous') is set, and some *
* prefix was inserted, return now, bypassing the list-displaying *
------------------------------------------------------------
--
[Tanaka Akira]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Autoremoveslash bug?
1998-10-05 5:27 Autoremoveslash bug? Tanaka Akira
@ 1998-10-05 9:41 ` Bart Schaefer
1998-10-05 10:20 ` Tanaka Akira
0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 1998-10-05 9:41 UTC (permalink / raw)
To: zsh-workers
On Oct 5, 2:27pm, Tanaka Akira wrote:
} Subject: Autoremoveslash bug?
}
} Hi. I'm using zsh-3.1.4 on Solaris-2.6.
}
} I found a small bug with automenu.
^^^^
autoremoveslash, as you said in Subject:.
(automenu set or unset makes no difference to this bug)
For the record, this is also _NOT_ the bug for which PWS posted fixes
in articles 4124 and 4128 (search for "remove slash bug" with the new
zsh archive server). I see the same behavior even with PWS's patches.
} Following fix works for me.
} Is this correct?
Unfortunately, I don't know the completion code well enough to answer.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Autoremoveslash bug?
1998-10-05 9:41 ` Bart Schaefer
@ 1998-10-05 10:20 ` Tanaka Akira
0 siblings, 0 replies; 4+ messages in thread
From: Tanaka Akira @ 1998-10-05 10:20 UTC (permalink / raw)
To: zsh-workers
In article <981005024107.ZM1609@candle.brasslantern.com>,
"Bart Schaefer" <schaefer@brasslantern.com> writes:
> } Is this correct?
>
> Unfortunately, I don't know the completion code well enough to answer.
That is wrong ;-)
Previous patch does not fix the behaviour on pressing slash key
instead of return key.
So, I'm using following patch now.
------------------------------------------------------------
--- zle_tricky.c.org Mon Oct 5 06:12:39 1998
+++ zle_tricky.c Mon Oct 5 08:16:01 1998
@@ -3269,7 +3269,10 @@
if(ae && !atend)
inststrlen(firstm + strlen(firstm) - ae, 0, ae);
if(ab || (ae && !atend))
+ {
+ fixsuffix();
inv = 1;
+ }
/* If the LIST_AMBIGUOUS option (meaning roughly `show a list only *
* if the completion is completely ambiguous') is set, and some *
* prefix was inserted, return now, bypassing the list-displaying *
------------------------------------------------------------
--
[Tanaka Akira]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Autoremoveslash bug?
@ 1998-10-05 11:07 Sven Wischnowsky
0 siblings, 0 replies; 4+ messages in thread
From: Sven Wischnowsky @ 1998-10-05 11:07 UTC (permalink / raw)
To: zsh-workers
Tanaka Akira wrote:
>
> Hi. I'm using zsh-3.1.4 on Solaris-2.6.
>
> I found a small bug with automenu.
>
> % zsh -f
> crane% cd /tmp
> crane% mkdir tst
> crane% touch tst/abc
> crane% touch tst/abcdef
> crane% echo tst
>
> press <TAB>
>
> crane% echo tst/
>
> press <TAB>
>
> crane% echo tst/abc
>
> press <Return>
>
> crane% echo tst/ab
> tst/ab
> crane%
>
> So, zsh deletes a last character.
>
As you have shown in your second version, using `fixsuffix()' is
better. I would prefer to place the call farther above in the call
chain, e.g.:
*** Src/Zle/zle_tricky.c.old Mon Oct 5 13:01:40 1998
--- Src/Zle/zle_tricky.c Mon Oct 5 13:01:51 1998
***************
*** 3258,3263 ****
--- 3258,3264 ----
int inv = 0;
menucmp = 0;
+ fixsuffix();
/* If we have to insert the first match, call do_single(). This is *
* how REC_EXACT takes effect. We effectively turn the ambiguous *
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1998-10-05 11:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-05 5:27 Autoremoveslash bug? Tanaka Akira
1998-10-05 9:41 ` Bart Schaefer
1998-10-05 10:20 ` Tanaka Akira
1998-10-05 11:07 Sven Wischnowsky
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).