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

repl: clear line after indenting when Vi mode is enabled #2114

Merged
merged 1 commit into from
Mar 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@
([#2098](https://github.com/pry/pry/pull/2098))
* Fixed bug when `Object#owner` is defined, which results into somewhat broken
method introspection ([#2113](https://github.com/pry/pry/pull/2113))
* Fixed bug when indentation leaves parts of input after pressing enter when
Readline is enabled with mode indicators for vi mode. This was supposed to be
fixed in v0.12.2 but it regressed
([#2114](https://github.com/pry/pry/pull/2114))

### [v0.12.2][v0.12.2] (November 12, 2018)

Expand Down
2 changes: 1 addition & 1 deletion lib/pry/repl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def calculate_overhang(current_prompt, original_val, indented_val)
# rb-readline doesn't support this method:
# https://github.com/ConnorAtherton/rb-readline/issues/152
if Readline.vi_editing_mode?
overhang += current_prompt.length - indented_val.length
overhang = output.width - current_prompt.size - indented_val.size
end
rescue NotImplementedError
# VI editing mode is unsupported on JRuby.
Expand Down