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

Do not call str.splitlines() twice in the same function #627

Closed
fukanchik opened this issue Mar 13, 2025 · 0 comments · Fixed by #628
Closed

Do not call str.splitlines() twice in the same function #627

fukanchik opened this issue Mar 13, 2025 · 0 comments · Fixed by #628

Comments

@fukanchik
Copy link
Contributor

Document.lines is a property which executes self.source.splitlines(True). It is used in apply_change and in word_at_position and in both cases called twice which is not necessary.

fukanchik pushed a commit to fukanchik/python-lsp-server that referenced this issue Mar 13, 2025
@krassowski krassowski linked a pull request Apr 3, 2025 that will close this issue
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 a pull request may close this issue.

1 participant