Repository navigation
gh-153401: Highlight matching delimiters in the REPL - #160038
Draft
johnslavik wants to merge 1 commit into
Draft
johnslavik wants to merge 1 commit into
johnslavik wants to merge 1 commit into
Conversation
johnslavik
force-pushed
the
repl-matching-delimiters
branch
from
October 21, 2026 14:48
5380891 to
9f4d9d6
Compare
johnslavik
force-pushed
the
repl-matching-delimiters
branch
from
October 21, 2026 21:10
95ec6ed to
cc50e86
Compare
Documentation build overview
214 files changed ·
|
pablogsal
force-pushed
the
repl-matching-delimiters
branch
from
November 26, 2026 11:25
cc50e86 to
f731b92
Compare
pablogsal
reviewed
Nov 26, 2026
| for i in (self.pos, self.pos - 1) | ||
| ): | ||
| return None | ||
| return find_matching_delimiter(self.get_unicode(), self.pos) |
Member
There was a problem hiding this comment.
Can we reuse the tokens here? On a debug build, a lookup in a 10,000-line buffer took about 130 ms each time the cursor moved to a delimiter.
Member
Author
There was a problem hiding this comment.
So I tried it before and it looked unnecessarily complicated. I assumed the sizes of buffer where it matters cannot be realistically hit in real use. But since you're bringing this, I will give it another try though.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.