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

Fix vi_to_column which was broken #679

Merged
merged 1 commit into from
Apr 15, 2024
Merged

Conversation

tompng
Copy link
Member

@tompng tompng commented Apr 14, 2024

def current_row
  wrapped_lines.flatten[wrapped_cursor_y]
end

wrapped_cursor_y does not exist, and raises NoMethodError.

Old implementation of vi_to_column is counting width. vi does it, Readline's vi-mode does not. It only counts string size.

I Removed the condition (total.last + mbchar_width) >= current_row_width because it is not needed in both vi and Readline's behavior.

@ima1zumi ima1zumi added the bug Something isn't working label Apr 15, 2024
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.

Thanks!

@ima1zumi ima1zumi merged commit 9e93ad5 into ruby:master Apr 15, 2024
40 checks passed
@tompng tompng deleted the fix_vi_to_column branch April 15, 2024 13:31
tenderlove added a commit to tenderlove/ruby that referenced this pull request Apr 15, 2024
* master: (29 commits)
  Not all `nm`s support the `--help` option
  Emit a performance warning when redefining specially optimized methods
  YJIT: A64: Avoid intermediate register in `opt_and` and friends (ruby#10509)
  [ruby/reline] Remove not implemented method (ruby/reline#680)
  [ruby/reline] Fix vi_to_column which was broken (ruby/reline#679)
  Include more debug information in test_uplus_minus
  [Universal parser] DeVALUE of p->debug_lines and ast->body.script_lines
  Add more assertions in `test_uplus_minus`
  `super{}` doesn't use block
  fix incorrect warning.
  Update default gems list at fc36394 [ci skip]
  [ruby/optparse] bump up to 0.5.0
  show warning for unused block
  Emit `warn` event for duplicated hash keys on ripper
  [ruby/reline] Refactored Default Key Bindings (ruby/reline#678)
  [ruby/reline] Refactor waiting_proc and waiting_operator_proc (ruby/reline#649)
  [pty] Fix missing `or`
  [pty] Fix `ptsname_r` fallback
  [ruby/irb] Allow defining custom commands in IRB (ruby/irb#886)
  [ruby/reline] Support `menu-complete-backward` command for upward navigation (ruby/reline#677)
  ...
artur-intech pushed a commit to artur-intech/ruby that referenced this pull request Apr 26, 2024
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.

2 participants