GNU bug report logs -
#73978
31.0.50; Text syntax applied on too many things in tsx-ts-mode
Previous Next
Reported by: Yuan Fu <casouri <at> gmail.com>
Date: Thu, 24 Oct 2024 04:08:02 UTC
Severity: normal
Found in version 31.0.50
Done: Yuan Fu <casouri <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> On Dec 24, 2024, at 11:40 PM, Juri Linkov <juri <at> linkov.net> wrote:
>
>>> ReactDOM.render(
>>> <div>
>>> <h1>Hello, Welcome to React and TypeScript</h1>
>>> </div>,
>>> document.getElementById("root")
>>> );
>>>
>>> 1. move point to the beginning of <h1>
>>> 2. type C-M-b
>>> 3. point incorrectly moves to inside <div>
>>>
>>> However, this the above patch, point doesn't move
>>> that is correct.
>>>
>>> Another test case:
>>>
>>> 1. move point to the beginning of the word "Welcome"
>>> 2. type C-M-b
>>> 3. point incorrectly moves to the letter "e" instead of correct "H"
>>>
>>> 4. type C-M-f a few times until the end of text
>>> 5. point stops at the letter "t" instead of moving after the last letter
>>>
>>> All these cases work correctly with the patch above.
>>
>> I understand the problem you want to solve, but the patch above will
>> bring back the bug I was trying to fix in the first place.
>
> The patch just demonstrated one of possible ways to solve the problem.
>
>> And I still don’t understand the intention of your patch. Maybe
>> I missed something. Am I correct that you want to apply string syntax
>> on the tags, eg, <div>, <button>, </button>, </div>?
>
> I don't need to apply string syntax on the tags. I just found
> that currently C-M-f navigation was broken. Maybe there are
> other ways to fix it?
Then let’s look for other ways to solve the problem you demonstrated. Dmitry, would there be any negative effects if we apply the whitespace syntax on all the text (rather than string syntax)? Ah, I guess skip-syntax wouldn’t work right. Is there another way to tell syntax-ppss to skip a chunk of text when scanning?
Yuan
This bug report was last modified 133 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.