Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lnav missbehaves with some readline settings #1341

Open
YasserKa opened this issue Nov 20, 2024 · 2 comments
Open

lnav missbehaves with some readline settings #1341

YasserKa opened this issue Nov 20, 2024 · 2 comments
Labels

Comments

@YasserKa
Copy link

YasserKa commented Nov 20, 2024

lnav version: 0.12.2

Some options in readline [1] make lnav misbehave. Note that this happens in Zsh as well even though it doesn't use readline.

All examples are in inputrc

  • This crashes lnav after pressing ;
set editing-mode vi
set show-mode-in-prompt on
  • This shows the behavior below
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

I press :123456789123456789 nothing appears in the command bar until 23456789, so :1234567891 aren't visible (same thing if I start with ;). I press <escape> and what I see 232 q:123456789123456789. If I press <enter> I get ✘ error: unknown command - 123456789123456789 which is to be expected, but command bar don't seem to behave properly.

2024-09-11_18:32:25

[1] https://wiki.archlinux.org/title/Readline

@tstack
Copy link
Owner

tstack commented Nov 22, 2024

Ultimately, support for vi mode is not something I'm going to support. It's entirely possible readline will be replaced at some point anyhow.

@YasserKa
Copy link
Author

YasserKa commented Nov 23, 2024

Thank you for the clarification. I have bindings for effective editing & navigation based on Emacs readline [1], and disabling show-mode-in-prompt solves the issue. If readline support is removed, I hope the replaced solution is able to replicate this workflow.

[1] https://readline.kablamo.org/emacs.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants