zsh-workers
 help / color / mirror / code / Atom feed
From: Stephen Rueger <stephen.rueger@rechnerpost.org>
To: zsh-workers@sunsite.dk
Subject: maybe PATCH: 21731 broke handling of prompts with newlines in it
Date: Thu, 22 Sep 2005 03:11:44 +0200	[thread overview]
Message-ID: <20050922011144.GA26563@rechnerpost.org> (raw)

Hello!

Disclaimer: I hardly know any C, and this is my first journey into the
Zsh source that didn't end with me giving up totally swamped, please
treat the following accordingly.

The new multibyte aware promptcount seems to have a test backwards that
checks if the special treatment of \n and \t can be skipped because the
shell is in the middle of processing a multibyte character.

This simple patch should solve the problem:

--- Src/prompt.c.old	2005-09-22 02:44:38.000000000 +0200
+++ Src/prompt.c	2005-09-22 02:45:30.000000000 +0200
@@ -859,7 +859,7 @@
 		 * relying on the character set being an extension
 		 * of ASCII so it's safe to test a single byte.
 		 */
-		if (multi) {
+		if (!multi) {
 #endif
 		    if (*str == '\t') {
 			w = (w | 7) + 1;



-- 
Stephen Rüger
stephen.rueger@rechnerpost.org


             reply	other threads:[~2005-09-22  1:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-22  1:11 Stephen Rueger [this message]
2005-09-22  1:42 ` Clint Adams
2005-09-22  2:11   ` Stephen Rueger
2005-09-22 10:31 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050922011144.GA26563@rechnerpost.org \
    --to=stephen.rueger@rechnerpost.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).