Skip to content
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

Fix "every small paint" across multiple lines #894

Open
Tracked by #797
pokey opened this issue Jul 27, 2022 · 1 comment
Open
Tracked by #797

Fix "every small paint" across multiple lines #894

pokey opened this issue Jul 27, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@pokey
Copy link
Member

pokey commented Jul 27, 2022

Currenlty, "every small paint" only returns selections from the first line if it is part of a multi-line pair, instead of returning all the paints in the given pair.

The following test case should pass:

languageId: plaintext
command:
  spokenForm: take every paint oats
  version: 2
  targets:
    - type: primitive
      modifiers:
        - type: everyScope
          scopeType: {type: boundedNonWhitespaceSequence}
      mark: {type: decoratedSymbol, symbolColor: default, character: o}
  usePrePhraseSnapshot: true
  action: {name: setSelection}
initialState:
  documentContents: |
    (hello world-whatever
    testing another)
  selections:
    - anchor: {line: 2, character: 0}
      active: {line: 2, character: 0}
  marks:
    default.o:
      start: {line: 0, character: 7}
      end: {line: 0, character: 12}
finalState:
  documentContents: |
    (hello world-whatever
    testing another)
  selections:
    - anchor: {line: 0, character: 1}
      active: {line: 0, character: 6}
    - anchor: {line: 0, character: 7}
      active: {line: 0, character: 21}
    - anchor: {line: 1, character: 0}
      active: {line: 1, character: 7}
    - anchor: {line: 1, character: 8}
      active: {line: 1, character: 15}
  thatMark:
    - anchor: {line: 0, character: 1}
      active: {line: 0, character: 6}
    - anchor: {line: 0, character: 7}
      active: {line: 0, character: 21}
    - anchor: {line: 1, character: 0}
      active: {line: 1, character: 7}
    - anchor: {line: 1, character: 8}
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: o}, modifiers: [{type: everyScope, scopeType: {type: boundedNonWhitespaceSequence}}]}]

Will probably be fixed by default after we implement #1057

@pokey pokey added the bug Something isn't working label Jul 27, 2022
@AndreasArvidsson
Copy link
Member

Well that's the way paint works and this one is a smaller/bounded version of paint. If you want it to expand to the entire inside then you can say "take every short paint inside". That is true both for paint and short paint.

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

2 participants