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 apply_common_opts() wrong substring when opts.max_len is set #1240

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

Bekaboo
Copy link
Contributor

@Bekaboo Bekaboo commented Oct 7, 2024

When opts.max_len is set and opts.max_len > #line_to_cursor, #line_to_cursor - opts.max_len + 1 will be negative which gives the wrong substring, see doc of string.sub

@L3MON4D3
Copy link
Owner

Oh, yeah of course!
Thanks for fixing it!

@L3MON4D3 L3MON4D3 merged commit 879d0a8 into L3MON4D3:master Oct 23, 2024
1 of 3 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.

2 participants