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

Add mode_string to prompt calculation dependencies #658

Merged
merged 2 commits into from Mar 24, 2024

Conversation

tompng
Copy link
Member

@tompng tompng commented Mar 22, 2024

show-mode-in-prompt was broken in v0.5.0.pre.1

Fixes it by adding prompt_mode to prompt list calculation dependencies.

To enable show-mode-in-prompt, add this to .inputrc

set editing-mode vi
set show-mode-in-prompt on
set vi-ins-mode-string (ins)
set vi-cmd-mode-string (cmd)

@ima1zumi ima1zumi added the bug Something isn't working label Mar 23, 2024
@ima1zumi
Copy link
Member

Can we add show-mode-in-prompt test for vi mode?

@tompng
Copy link
Member Author

tompng commented Mar 24, 2024

Modified the existing test. The test will fail in master branch with:

<"(ins)prompt> :a\n" +
"=> :a\n" +
"(ins)prompt> :a\n" +
"=> :a\n" +
"(cmd)prompt> :a\n"> expected but was
<"(ins)prompt> :a\n" +
"=> :a\n" +
"(cmd)prompt> :a\n" +
"=> :a\n" +
"(ins)prompt> :a\n">

Copy link
Member

@ima1zumi ima1zumi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ⭐

@ima1zumi ima1zumi merged commit a0cee06 into ruby:master Mar 24, 2024
40 checks passed
matzbot pushed a commit to ruby/ruby that referenced this pull request Mar 24, 2024
(ruby/reline#658)

* Add mode_string to prompt calculation dependencies

* Update vi show-mode-in-prompt test

ruby/reline@a0cee06ec5
@tompng tompng deleted the prompt_mode_string_deps branch March 24, 2024 12:35
artur-intech pushed a commit to artur-intech/ruby that referenced this pull request Apr 26, 2024
(ruby/reline#658)

* Add mode_string to prompt calculation dependencies

* Update vi show-mode-in-prompt test

ruby/reline@a0cee06ec5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

None yet

2 participants