gokcehan / lf

Terminal file manager
MIT License
7.79k stars 331 forks source link

r28 cursor reset when rename #1070

Closed jetgogol closed 1 year ago

jetgogol commented 1 year ago

In last update. When I rename, file cursor now changes to block (I using "|") and after exit terminal keep it as block.

My terminal emulator st if it means anything.

SeekingBlues commented 1 year ago

See gdamore/tcell#559. Try changing the default cursor style of your terminal emulator to |.

jetgogol commented 1 year ago

May be it's st problem, but I changed default cursor to "|" in config.h already. Also I tested same build of lf in tilix and it works fine.

jetgogol commented 1 year ago

st version 0.8.5, but in st version 0.9 same problem.

SeekingBlues commented 1 year ago

It does seem like st's problem. It assumes the "default" cursor style (\e[0 q) to be blinking block, which is supposed to be the standard behavior. tcell makes a different assumption that it really means the user's default, which is an extension supported by many terminals (but not st).

jetgogol commented 1 year ago

It does seem like st's problem. It assumes the "default" cursor style (\e[0 q) to be blinking block, which is supposed to be the standard behavior. tcell makes a different assumption that it really means the user's default, which is an extension supported by many terminals (but not st).

Anyway r27 works right, so don't closing this issue to keep my finger on pulse. May be someone else will add details.

joelim-work commented 1 year ago

I don't think there's anything we can reasonably do about this. As mentioned above, tcell sends \e[0 q to instruct the terminal to reset its cursor style to the default, but st interprets this as blinking block.

The expectation of st and other suckless projects is that the user should be able to patch them to suit their needs. For your case, you should be able to modify the code (e.g. the xsetcursor function) to map 0 to your preferred cursor style.