Skip to content

Commit

Permalink
Merge pull request #2114 from pry/1859-vi-overhang-fix
Browse files Browse the repository at this point in the history
repl: clear line after indenting when Vi mode is enabled
  • Loading branch information
kyrylo committed Mar 21, 2020
2 parents bb10f95 + b634abc commit fc30295
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
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
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

0 comments on commit fc30295

Please sign in to comment.