Skip to content

Slurp-forward may cause syntax error by adding unmatched paren instead of slurping #1171

Closed
@pbwolf

Description

Starting with this

(def foo
  (str
   )
  42)

Point within the str form, e.g., after the r
Slurp forward

(def foo
  (str)
  42))

The str did not embrace the following form, but instead lost some whitespace; and an unmatched close-paren, which Calva highlights in red, got added at the end of the following form.

Whitespace inside the end of the str form seems to be the key to the matter. If there is none, then slurp-forward works as expected by bringing the 42 into the str form.

Observed in Calva 2.0.195

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpareditParedit and structural editing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions