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 completion dialog position when completed part is word wrapped #692

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

tompng
Copy link
Member

@tompng tompng commented Apr 29, 2024

When completion target is very long, completed text completely overlaps with dialog
before_long_completion
This pull request fix it
after_long_completion

Description

The original intention of y = -1 is to render dialog on the cursor line when the completed part (oobar) is word wrapped. It looks good in this case.
target_not_wrapped

When completion target 111111.f is word wrapped but completed part loor is not word wrapped
before_wrapped
Completed part might be completely hidden by dialog.
before_wrapped_with_doc

In such case, this pull request will set dialog position to left edge, just below cursor.
after_wrapped

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

LGTM!

@ima1zumi ima1zumi merged commit 2d9acd1 into ruby:master Apr 30, 2024
40 checks passed
@tompng tompng deleted the completion_dialog_start_row branch May 1, 2024 05:50
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