cursorless icon indicating copy to clipboard operation
cursorless copied to clipboard

Fix `"every small paint"` across multiple lines

Open pokey opened this issue 3 years ago • 1 comments

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}}]}]

pokey avatar Jul 27 '22 15:07 pokey

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.

AndreasArvidsson avatar Sep 14 '22 06:09 AndreasArvidsson