Skip to content

Vi mode cursor doesn't respect iTerm2 cursor settings #9698

Description

@ericvw
eric@G6D6PX2JTW ~> fish --version
fish, version 3.6.1
eric@G6D6PX2JTW ~> uname -a
Darwin G6D6PX2JTW 21.6.0 Darwin Kernel Version 21.6.0: Mon Dec 19 20:43:09 PST 2022; root:xnu-8020.240.18~2/RELEASE_ARM64_T6000 arm64 arm Darwin
eric@G6D6PX2JTW ~> echo $TERM
xterm-256color

When using any of the Vi modes in iTerm2 with default settings, the cursor is always set to block regardless of the settings in iTerm2 Settings > Profiles > Text > Cursor.

It turns out the following is where "block" is being set:

set -q fish_cursor_unknown
or set -g fish_cursor_unknown block
.

Is there an opportunity to "pass-through" what iTerm sets as the default cursor style?

I tested an override to fish_vi_cursor.fish with the following handler code to achieve the desired behavior:

set -l varname fish_cursor_\$fish_bind_mode
if set -q \$varname
    $function \$\$varname
end

I'm happy to submit a PR if this is of interest.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions