Skip to content

Fix vi_yank or vi_delete_meta copies nil bug - #726

Merged
ima1zumi merged 1 commit into
ruby:masterfrom
tompng:vi_nil_copy_fix
Jun 18, 2024
Merged

ima1zumi merged 1 commit into
ruby:masterfrom
tompng:vi_nil_copy_fix

Conversation

@tompng

@tompng tompng commented Jun 12, 2024

Copy link
Copy Markdown
Member

In vi command mode, and when cursor is at the beginning of the line, dhp or yhp will copy a nil to @vi_clipboard and tries to paste nil as a text, and raises:

lib/reline/line_editor.rb:2348:in `vi_paste_next': undefined method `size' for nil (NoMethodError)
    if @vi_clipboard.size > 0

@tompng tompng added the bug Something isn't working label Jun 12, 2024

@ima1zumi ima1zumi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@ima1zumi
ima1zumi merged commit 46b30b0 into ruby:master Jun 18, 2024
@tompng
tompng deleted the vi_nil_copy_fix branch June 18, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants