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

Increase maximum selection length for highlighting #1470

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Oct 7, 2024

Fixes #1469

The previous limit on selection highlighting length was based on selecting only a single word but the plugin actually works on multi-word selections so the limit of less than one line (potentially) does not make a lot of sense. I have increased it to 255 for now.

@zeebok
Copy link
Contributor

zeebok commented Oct 8, 2024

Hmmm maybe I misunderstood the issue. The later example in #1443 involves highlighting just a word and causing the crash. I am not sure if I have run into an issue with multi-line deletion issue, or at least don't run into either issue on OS8 stable ☹️

@jeremypw
Copy link
Collaborator Author

jeremypw commented Oct 8, 2024

I hadn't seen that last example in #1443. I've never seem a crash with just one word selected so I am not sure whether this PR fixes that. #1443 is specifically about multi-line selections anyway. I can reproduce that issue every time.

An alternative approach to this would be to limit selection highlighting to just one word (which the original length limit implies was the original intention) - that would automatically exclude multiple lines.

@zeebok
Copy link
Contributor

zeebok commented Oct 22, 2024

I hadn't seen that last example in #1443. I've never seem a crash with just one word selected so I am not sure whether this PR fixes that. #1443 is specifically about multi-line selections anyway. I can reproduce that issue every time.

At the moment I have the opposite luck with repro lol. I can always get the single word crash (with the highlight plugin on) but not a multiline.... is it pretty consistent with a certain doc that I can peek at?

@jeremypw
Copy link
Collaborator Author

@zeebok Thanks for looking into this - its strange that you get different symptoms! If you take a look at the comments to #1447, there is a text file there that I posted on July 27 for Danielle to use to reproduce. I may have to reduce the scope of this to fixing #1469 if it does not fix the other issue for everyone.

@jeremypw
Copy link
Collaborator Author

I don't think it relies on a particular document - I never get a crash with single word deletion of a selected, highlighted word (with BackSpace) whereas as you and others do. It must be some obscure race that depends on details of the particular machine being used.

@jeremypw
Copy link
Collaborator Author

jeremypw commented Oct 22, 2024

@zeebok I've just noticed that after trying to reproduce the single word crash, the document no longer responds to keyboard input, although Code overall responds as normal - is this the issue you have?

Forget it - I had turned the Vim emulation on!!

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.

Certain word selections are not highlighted by plugin
2 participants