Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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!!

@jeremypw jeremypw requested a review from a team January 8, 2025 16:52
@danirabbit danirabbit requested a review from zeebok February 6, 2025 18:04
Copy link
Contributor

@zeebok zeebok left a comment

Choose a reason for hiding this comment

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

This at the very least fixes the issue in the description, so we should just merge it in

@jeremypw jeremypw merged commit 2e89995 into master Mar 10, 2025
6 checks passed
@jeremypw jeremypw deleted the jeremypw/fix-highlight-selection branch March 10, 2025 09:27
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

3 participants