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

Re: accept-and-menu-complete Inserts a NULL in -test-3



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



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