Skip to content

Fix completion dialog position when completed part is word wrapped - #692

Merged
ima1zumi merged 1 commit into
ruby:masterfrom
tompng:completion_dialog_start_row
Apr 30, 2024
Merged

ima1zumi merged 1 commit into
ruby:masterfrom
tompng:completion_dialog_start_row

Conversation

@tompng

@tompng tompng commented Apr 29, 2024 •

Copy link
Copy Markdown
Member

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

@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.

LGTM!

@ima1zumi
ima1zumi merged commit 2d9acd1 into ruby:master Apr 30, 2024
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants