zsh-workers
 help / color / mirror / code / Atom feed
* maybe PATCH: 21731 broke handling of prompts with newlines in it
@ 2005-09-22  1:11 Stephen Rueger
  2005-09-22  1:42 ` Clint Adams
  2005-09-22 10:31 ` Peter Stephenson
  0 siblings, 2 replies; 4+ messages in thread
From: Stephen Rueger @ 2005-09-22  1:11 UTC (permalink / raw)
  To: zsh-workers

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


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

* Re: maybe PATCH: 21731 broke handling of prompts with newlines in it
  2005-09-22  1:11 maybe PATCH: 21731 broke handling of prompts with newlines in it Stephen Rueger
@ 2005-09-22  1:42 ` Clint Adams
  2005-09-22  2:11   ` Stephen Rueger
  2005-09-22 10:31 ` Peter Stephenson
  1 sibling, 1 reply; 4+ messages in thread
From: Clint Adams @ 2005-09-22  1:42 UTC (permalink / raw)
  To: zsh-workers

> -		if (multi) {
> +		if (!multi) {

I'm committing this.  However, the logic to set 'multi' appears to be
lacking.


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

* Re: maybe PATCH: 21731 broke handling of prompts with newlines in it
  2005-09-22  1:42 ` Clint Adams
@ 2005-09-22  2:11   ` Stephen Rueger
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Rueger @ 2005-09-22  2:11 UTC (permalink / raw)
  To: zsh-workers

On Wed, Sep 21, 2005 at 09:42:03PM -0400, Clint Adams wrote:
> > -		if (multi) {
> > +		if (!multi) {
> 
> I'm committing this.  However, the logic to set 'multi' appears to be
> lacking.

It's at line 896:

		/* else character is incomplete, keep looking. */
		multi = 1;

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


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

* Re: maybe PATCH: 21731 broke handling of prompts with newlines in it
  2005-09-22  1:11 maybe PATCH: 21731 broke handling of prompts with newlines in it Stephen Rueger
  2005-09-22  1:42 ` Clint Adams
@ 2005-09-22 10:31 ` Peter Stephenson
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 2005-09-22 10:31 UTC (permalink / raw)
  To: zsh-workers

Stephen Rueger <stephen.rueger@rechnerpost.org> wrote:
> -		if (multi) {
> +		if (!multi) {

Yes, the fix is correct:  I think this happened because I was originally
using a character pointer rather than a flag and the sense was the other
way around.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************


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

end of thread, other threads:[~2005-09-22 10:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-22  1:11 maybe PATCH: 21731 broke handling of prompts with newlines in it Stephen Rueger
2005-09-22  1:42 ` Clint Adams
2005-09-22  2:11   ` Stephen Rueger
2005-09-22 10:31 ` Peter Stephenson

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