[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] configurable part separator lines

From: Ken Hornstein
Subject: Re: [Nmh-workers] configurable part separator lines
Date: Tue, 29 Apr 2014 15:46:05 -0400

>it seems that if i use mh-format coloring in my mhshow marker
>line, that the color gets reset at the end of the marker line
>whether i include a resetterm sequence or not.  i see that scan.curses
>explicitly provides resetterm, so now i'm wondering if what
>i'm seeing with mhshow markers is a bug or a feature?

I know you already figured out that it was "less" doing that, but I wanted
to explain why that resetterm sequence was there, and a bit of extra magic

mh-format(5) has the concept of "width" - the number of printable columns
that it should output.  It used to be that "width" was the buffer size,
but that isn't quite sufficient nowadays.  So now mh-format will keep
track of the column width, and appropriately handle the case of multibyte
character sets (it also can handle the case of zero-width characters,
such as combining Unicode sequences, assuming that wcwidth() is doing
the right thing).  Because of that, %(zputlit) was created so you could
output characters that didn't count against column width.

Because mh-format(5) output cuts off after you exceed width, you'd normally
never output the final characters and thus the terminal would never get reset.
So there's special code that goes through and processes any zputlit
instructions and makes sure they always get output, even if width has
been exceeded.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]