Skip to content

Fix "every small paint" across multiple lines #894

Description

@pokey

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions