Skip to content

paredit-kill freezes when killing the last form in the buffer #81

@alexander-yakushev

Description

@alexander-yakushev

Expected behavior

When standing at the beginning of a form that is the last one in the buffer and pressing C-k (which is bound to paredit-kill when Paredit is enabled), the form should be killed like any other form.

Actual behavior

Emacs freezes and spins CPU at 100%. Pressing C-g gets it out of this, but the form still remains.

Steps to reproduce the problem

Go to any Clojure file, enable Paredit, perform paredit-kill on the last form, e.g.:

Image

Environment & Version information

clojure-ts-mode version

clojure-ts-mode 0.4.0-snapshot (package: 20250415.804)

tree-sitter-clojure grammar version

Not sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions