zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: command line not refresh properly with wide chars when cursor would have been inside one
Date: Sat, 16 Oct 2010 14:36:45 +0200	[thread overview]
Message-ID: <AANLkTi=NENPEeVmxgqQqT=R_Lfb9grY6VtQGYtnmagO9@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimh+E7u1n1+t4bR1On5wO-xGcJS9ssdp+ERmGZw@mail.gmail.com>

On 16 October 2010 13:21, Mikael Magnusson <mikachu@gmail.com> wrote:
> zsh -f
> % echo ののの
> % uuuuuu<up>
> % echo の    [cursor here]
>
> if you type one more (or less, or three or five more) letters, the
> line refreshes properly, but when it would have ended up in the middle
> of a wide char, the line gets cut off. This has bothered me for quite
> some time but I've never been able to figure out the exact
> circumstances before. Verified in latest cvs and 4.3.6 with -f.

Actually the problem is when the previous line ends in a wide char in
the new line, doesn't matter where the cursor is.

Hmm, it seems the problem is somewhere in refreshline (surprise,
right?). First all the characters of "echo の" are printed one by one,
but then ol is advanced past the end of the old string "uuuuuu" and
somehow after that are ののの which causes

/* skip past all matching characters */
for (; nl->chr && ZR_equal(*ol, *nl); nl++, ol++, ccs++)
    ;

to trigger, which is why the rest of the string isn't output. Why this
happens is a bit of a mystery to me still.

-- 
Mikael Magnusson


  reply	other threads:[~2010-10-16 12:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-16 11:21 Mikael Magnusson
2010-10-16 12:36 ` Mikael Magnusson [this message]
2010-10-16 12:42   ` Mikael Magnusson
2010-10-17 18:00     ` 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='AANLkTi=NENPEeVmxgqQqT=R_Lfb9grY6VtQGYtnmagO9@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --cc=zsh-workers@zsh.org \
    /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).