cursorless icon indicating copy to clipboard operation
cursorless copied to clipboard

Bring range sets wrong source mark

Open AndreasArvidsson opened this issue 3 years ago • 7 comments

a
b

|

bring past air chuck source removes the new text as well as the source

AndreasArvidsson avatar Jan 13 '22 22:01 AndreasArvidsson

@pokey I have investigated this issue and the problem is related to DecorationRangeBehavior.OpenOpen

Since the insert is performed at the end of the source range and we have OpenOpen the source range expands to cover the destination range.

AndreasArvidsson avatar Jul 10 '22 19:07 AndreasArvidsson

Ah right. Is there any reason we want that to be open, or is the fix as easy as just making it closed?

pokey avatar Jul 10 '22 19:07 pokey

I can't think of one. Am just wondering why we chose that in the first place?

AndreasArvidsson avatar Jul 10 '22 19:07 AndreasArvidsson

🤷 I'd be tempted to just change it and see if any tests break

pokey avatar Jul 10 '22 20:07 pokey

44 tests with changed that marks. hmm

AndreasArvidsson avatar Jul 10 '22 21:07 AndreasArvidsson

Maybe we're trying to use it to capture the "that" mark with "bring after"? Are the "that" marks ending up empty?

We should maybe do closed with "source" mark and open with "that" mark?

pokey avatar Jul 11 '22 07:07 pokey

Although I wonder if we're getting the correct "that" mark either here

pokey avatar Jul 11 '22 07:07 pokey

The that mark is correct. It's only source that expands to the destination

AndreasArvidsson avatar Jul 03 '23 07:07 AndreasArvidsson

The simplest example of this problem is bring air after air take source

AndreasArvidsson avatar Jul 03 '23 07:07 AndreasArvidsson