GNU bug report logs - #73978
31.0.50; Text syntax applied on too many things in tsx-ts-mode

Previous Next

Package: emacs;

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

From: Juri Linkov <juri <at> linkov.net>
To: Yuan Fu <casouri <at> gmail.com>
Cc: Dmitry Gutov <dmitry <at> gutov.dev>, Theodor Thornhill <theo <at> thornhill.no>, 73978 <at> debbugs.gnu.org
Subject: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode
Date: Wed, 25 Dec 2024 09:40:48 +0200
>> 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?




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.