[dev] [st] cursor style not actually reset through Se extension

From: Wilson M. S. Moncayo <spoonm_AT_spoonm.org>
Date: Sat, 21 Dec 2019 05:00:53 -0300

The tmux terminfo extensions Ss and Se are respectively used to switch
and reset the cursor style, and were finally made to work in st in
commit 8386642, wherein the string "\E[2 q" is used to reset the cursor
style.

I don't have a lot of experience with terminfo and escape sequences, but
from what I understood of the csihandle() function in st.c, that is
equivalent to setting the cursorshape variable to 2 (block), the default
value in config.def.h. In my config.h, I set cursorshape to 4
(underline).

After starting neovim in st, the cursor style is successfully changed to
a block when in normal mode and a vertical bar when in insert mode, but
once the process is killed, the cursor becomes a block, not an underline
(cursorshape=4) as it should have.

Thinking that's a problem with the value of Se in st.info, I manually
changed it to "\E[4 q" and rebuilt st. It /didn't/ keep the cursor from
becoming a block after closing neovim. `printf '\033[4 q'` does turn the
cursor back into an underline, as does `printf '\033[ q'`, which I also
tried using as Se to no avail.

I tried deleting everything under ~/.terminfo and running tic again,
copying the output of tic to /usr/share/terminfo, and even rebooting
inbetween changes done to st.info, to rule out problems unknown to me.
I'm wondering if this is the fault of st or neovim.

Anyone going through the same thing?

Received on Sat Dec 21 2019 - 09:00:53 CET

This archive was generated by hypermail 2.3.0 : Sat Dec 21 2019 - 09:12:06 CET