I recently updated to the most current release of fish, version 3.1.0. I found that in the new version, the cursor shape is not updated correctly anymore when using vi mode. I confirmed this for current master as well.
$ rg cursor ~/.config/fish/fish_variables
30:SETUVAR fish_cursor_default:block\x1eblink
31:SETUVAR fish_cursor_insert:line\x1eblink
32:SETUVAR fish_cursor_replace_one:underscore\x1eblink
33:SETUVAR fish_cursor_visual:block
With the above settings, in a new session, fish shows the correct line shape. It switches to block shape when I press ESC. However, it does not switch back to line if I then enter insert mode with a or i. It also does not switch to underscore if I press r.
I bisected this issue and traced it back to ff5524944, which removed event handler support for implicit sets. Such a set is present in input.cpp:
|
vars.set_one(FISH_BIND_MODE_VAR, ENV_GLOBAL, bm); |
To confirm this, I added code to input.cpp that would collect fired events in an event_t vector, and passed it to event_fire. With that change, the cursor updated correctly again.
I planned to send a pull request along with this report, but for this I am not familiar enough with the codebase (this is my first glance at it).
I recently updated to the most current release of fish, version 3.1.0. I found that in the new version, the cursor shape is not updated correctly anymore when using vi mode. I confirmed this for current master as well.
With the above settings, in a new session, fish shows the correct line shape. It switches to block shape when I press ESC. However, it does not switch back to line if I then enter insert mode with a or i. It also does not switch to underscore if I press r.
I bisected this issue and traced it back to ff5524944, which removed event handler support for implicit sets. Such a set is present in input.cpp:
fish-shell/src/input.cpp
Line 192 in e1a08e3
To confirm this, I added code to input.cpp that would collect fired events in an
event_tvector, and passed it toevent_fire. With that change, the cursor updated correctly again.I planned to send a pull request along with this report, but for this I am not familiar enough with the codebase (this is my first glance at it).