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 get_visual argument order bug #69

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

ajenkinski
Copy link
Contributor

@ajenkinski ajenkinski commented Aug 28, 2023

Ensure that the start_row, start_col, end_row, and end_col arguments to nvim_buf_get_text are passed in the correct order regardless of the direction of the visual selection. Previously, if the end of the visual selection was before the start, nvim_buf_get_text would raise an error saying "start_col must be less than end_col".

Fixes #63

@weeman1337 weeman1337 self-requested a review August 28, 2023 12:48
@weeman1337 weeman1337 force-pushed the fix-get-visual branch 2 times, most recently from f6e99fc to f80248a Compare December 15, 2023 14:13
Copy link
Collaborator

@weeman1337 weeman1337 left a comment

Choose a reason for hiding this comment

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

Looks good 👍 Thank you for your contribution @ajenkinski

Ensure that the `start_row`, `start_col`, `end_row`, and `end_col` arguments to `nvim_buf_get_text`
are passed in the correct order regardless of the direction of the visual selection.  Previously,
if the end of the visual selection was before the start, `nvim_buf_get_text` would raise an error
saying "start_col must be less than end_col".
@weeman1337 weeman1337 merged commit 731a046 into nvim-telescope:master Dec 15, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Visual selection doesn't work when selecting from end to start
2 participants