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 "go to line" behaviour when column number is not explicitly set #1446

Merged
merged 2 commits into from
Jul 2, 2024

Conversation

colinkiama
Copy link
Member

When the value of offset in the SourceView widget's go_to_line method is less than 0, use 0 as the character position instead of offset to prevent cursor being moved to the line before the intended line number to go to.

@colinkiama colinkiama requested a review from a team June 30, 2024 13:49
Copy link
Collaborator

@jeremypw jeremypw left a comment

Choose a reason for hiding this comment

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

Makes sense; the functions calling this could have offset = -1, at least theoretically.

@jeremypw jeremypw merged commit 256d0bc into master Jul 2, 2024
6 checks passed
@jeremypw jeremypw deleted the colinkiama/fix-go-to-line-behaviour branch July 2, 2024 17:54
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.

2 participants