You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cursor offset with show-mode-in-prompt string #657
I have the following config in my .inputrc to modify the cursor shape via escape sequences in the vi-mode-string variables:
set editing-mode vi
set show-mode-in-prompt on
set vi-ins-mode-string \1\e[6 q\2
set vi-cmd-mode-string \1\e[2 q\2
With these escape sequences in place the IRB prompt is offset (it reads rb(main) instead of irb(main)) and cursor/caret is placed at the beginning of the line (over the 'r') instead of at the prompt. Typing inserts the correct characters at the prompt and the cursor moves but keeps the original offset.
For example, typing the command p 1 would move the cursor as indicated:
rb(main):001>
^
rb(main):001> p
^
rb(main):001> p
^
rb(main):001> p 1
^
rb(main):002>
^
Terminal Emulator
Gnome Terminal, Black Box, Alacritty, iTerm2, Gnome Console
Activity
tompng commentedon Mar 22, 2024
Looks like a config loading bug.
q\2part is ignored, maybe because it uses.split(' ').Using \x20 might be a workaround
inukshuk commentedon Mar 22, 2024
@tompng good catch, thank you! Using
\x20to work around for now.allow space in config value
allow space in config value (#705)
[ruby/reline] allow space in config value