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

Re: Fun redraw issue with double-width characters



On Oct 25,  6:14am, Mikael Magnusson wrote:
}
} I am asking this only out of curiosity, how come updates on the first
} line are done like [...]
} while updates on the second line (ie after wrapping everything) are
} done shorter, like [...]

There's a complicated algorithm based on querying terminfo/curses for
the "expense" involved in doing any given screen update, which is used
to decide whether it's more efficent to send terminal controls to move
the screen image around, or instead to simply overwrite what's there.

It's possible that the computation of "expense" is wrong when some of
the characters to be moved are multibyte, but it also might be that what
constitutes "expense" doesn't map directly to the number of bytes that
pass through write().



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