zsh-workers
 help / color / mirror / code / Atom feed
* accept-and-menu-complete Inserts a NULL in -test-3
@ 1999-07-25  2:06 Vin Shelton
  1999-07-25  5:03 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Vin Shelton @ 1999-07-25  2:06 UTC (permalink / raw)
  To: zsh-workers


I've noticed the following problem in -test-3.  It seems to be there
in my slightly-patched copy of -test-2, also.  This is using old-style 
completion.

/usr/local/zsh-3.1.6-test-3/bin/zsh -f
mithril% uname -a     
Linux mithril 2.2.10-ac12 #1 SMP Tue Jul 20 22:54:13 EDT 1999 i686 unknown
mithril% echo $ZSH_VERSION
3.1.6-test-3
mithril% bindkey '^X\t' accept-and-menu-complete
mithril% ls -d texinfo*
texinfo-3.12  texinfo-3.12h  texinfo-3.12n
mithril% ls -d texinfo-3.12<TAB><TAB>^X<TAB>

results in:

mithril% ls -d texinfo-3.12^@texinfo-3.12h/

so, of course, everything after ^@ gets ignored.

TIA,
  vin


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

* Re: accept-and-menu-complete Inserts a NULL in -test-3
  1999-07-25  2:06 accept-and-menu-complete Inserts a NULL in -test-3 Vin Shelton
@ 1999-07-25  5:03 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 1999-07-25  5:03 UTC (permalink / raw)
  To: Vin Shelton, zsh-workers

On Jul 24, 10:06pm, Vin Shelton wrote:
} Subject: accept-and-menu-complete Inserts a NULL in -test-3
}
} mithril% bindkey '^X\t' accept-and-menu-complete
} mithril% ls -d texinfo*
} texinfo-3.12  texinfo-3.12h  texinfo-3.12n
} mithril% ls -d texinfo-3.12<TAB><TAB>^X<TAB>
} 
} results in:
} 
} mithril% ls -d texinfo-3.12^@texinfo-3.12h/

The following fixes this for me, and I don't see how it can be wrong even
if it's incomplete:

Index: Src/Zle/zle_tricky.c
===================================================================
@@ -568,6 +568,8 @@
 	cs = minfo.pos + minfo.len + minfo.insc - (*(minfo.cur))->qisl;
 	if (cs < l)
 	    foredel(l - cs);
+	else if (cs > ll)
+	    cs = ll;
 	inststrlen(" ", 1, 1);
 	if (parpre)
 	    inststr(parpre);

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


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

end of thread, other threads:[~1999-07-25  5:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-25  2:06 accept-and-menu-complete Inserts a NULL in -test-3 Vin Shelton
1999-07-25  5:03 ` Bart Schaefer

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).