Skip to content

Don't include added delimiters in "that" mark #202

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

Open
3 tasks
Tracked by #729
pokey opened this issue Aug 7, 2021 · 1 comment
Open
3 tasks
Tracked by #729

Don't include added delimiters in "that" mark #202

pokey opened this issue Aug 7, 2021 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@pokey
Copy link
Member

pokey commented Aug 7, 2021

The problem

In the following file

hello
world

Calling the following two commands

  1. "bring line harp to after whale"
  2. "indent that"

Results in the following

hello
    world
    hello

It should be

hello
world
    hello

The solution

We add support in our selection update tracker code for updating the range for an edit, so that the client can determine the final range of their edit range, after the edits are applied. The "bring" code will then make it so that each insertion which is not a delimiter is tracked, and set the "that" mark to the list of these insertions.

  • Also highlight just these insertions rather than highlighting the delimiters
@pokey pokey added the enhancement New feature or request label Aug 7, 2021
@pokey
Copy link
Member Author

pokey commented Aug 7, 2021

I believe we could fix this issue and #185 by not including the added delimiter in the "that" mark when using "bring to after". Does that seem like reasonable behaviour?

At some point we might want to make it so that the "that" mark includes both an inside and outside range, but I think the above is a reasonable place to start that I believe should be not too bad to implement

@pokey pokey added bug Something isn't working and removed enhancement New feature or request labels Aug 7, 2021
@pokey pokey added this to the 0.23.0 milestone Sep 29, 2021
@pokey pokey modified the milestones: 0.23.0, 0.24.0 Oct 27, 2021
@pokey pokey modified the milestones: 0.24.0, 0.25.0 Dec 7, 2021
@pokey pokey modified the milestones: On deck, 0.26.0 Jan 15, 2022
@pokey pokey modified the milestones: 0.26.0, On deck Jan 16, 2022
@pokey pokey self-assigned this Jan 18, 2022
@pokey pokey changed the title Improve "that" mark for "bring to after line" Don't include added delimiters in "that" mark Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant