Re: [hackers] [st] Fix cursor move with wide glyphs || Quentin Rameau

From: Tim Culverhouse <tim_AT_timculverhouse.com>
Date: Sun, 25 Feb 2024 08:42:36 -0600

On Sun Feb 25, 2024 at 8:13 AM CST, Quentin Rameau wrote:
> Would you have a suggestion about how to handle cursor absolute
> position with text position, maybe we need some addition state?

I would suggest that cursor position control sequences should always operate on
a single-column basis. This is in line with every other terminal that handles
wide characters. It is up to the application running in the emulator to know
where it wants to position the cursor.

For example, the command below should move the cursor into the emoji but the
second `\e[D` should have not *visual* change, but the cursor is actually in the
"first" column of the emoji

  printf " 😀" && sleep 2 && printf "\e[D" && sleep 2 && printf "\e[D" && sleep 2

Just my two cents.

-- 
Tim
Received on Sun Feb 25 2024 - 15:42:36 CET

This archive was generated by hypermail 2.3.0 : Sun Feb 25 2024 - 16:24:36 CET