zsh-workers
 help / color / mirror / code / Atom feed
* bug in delete-to-char in 4.3.9
@ 2008-12-07  7:18 Greg Klanderman
  2008-12-07 18:43 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Klanderman @ 2008-12-07  7:18 UTC (permalink / raw)
  To: Zsh list

[-- Attachment #1: message body text --]
[-- Type: text/plain, Size: 440 bytes --]


Hi, there appears to be a small bug in delete-to-char in zsh 4.3.9.
I'm upgrading from 4.2.5 so don't know how long ago it was introduced.
The bug causes either incorrect behavior, or the crash:

| zsh: fatal error: out of memory

zap-to-char works so long as you don't give it a prefix (count)
argument.

Below is the obvious patch obtained by comparing the code with 4.2.7
and looking for discrepancies; it seems to work.

cheers,
Greg


[-- Attachment #2: patch --]
[-- Type: application/octet-stream, Size: 396 bytes --]

--- /home/greg/.backups/deltochar.c!!!build!zsh!zsh-4.3.9!Src!Zle!.~1~	2008-04-14 04:45:16.000000000 -0400
+++ zsh-4.3.9/Src/Zle/deltochar.c	2008-12-07 01:52:54.000000000 -0500
@@ -48,7 +48,7 @@
 	    if (dest != zlell) {
 		/* HERE adjust dest for trailing combining chars */
 		if (!zap || n > 0)
-		    INCCS();
+		    dest++;
 		if (!n) {
 		    forekill(dest - zlecs, CUT_RAW);
 		    ok++;

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

end of thread, other threads:[~2008-12-08 15:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-07  7:18 bug in delete-to-char in 4.3.9 Greg Klanderman
2008-12-07 18:43 ` Peter Stephenson
2008-12-08 15:10   ` Greg Klanderman

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