Markus,
It's obvious that you're uncomfortable with requiring a code to be sent
with every character that has it's default width overidden. OTOH I and
others have an aversion to more breakable state at the terminal end.
How about this as a simplified compromise:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
CSI > Pw ; Pn w
Pw : The width requested for the following characters, default 2.
Pn : The number of characters to set, default 1.
The default widths are as defined by wcwidth().
A width of 3 is available for Devanagari and any who may need it.
Composing characters are treated as part of the preceding composee.
The effect on a non-printable character is undefined but probably
disables the seq.
Unknown characters (and U+FFFD) are treated as printable.
If there are any pending overrides from the last execution of this
sequence then they are discarded.
Examples:
Single character double width override.
CSI > w
CSI > 2 w
Single character single width override.
CSI > 1 w
Multiple character double width override.
CSI > 2 ; Pn w
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
I've not included any full modal switches nor the 'Force normal character
to be interpreted as a composing character' facility nor monitor mode.
Still the sequence
CSI > 3 ; 2000000000 w
could be irritating unless <NL> clears the count.
--
Rob. (Robert de Bath <rdebath @ poboxes.com>)
<http://www.cix.co.uk/~mayday>
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/