Skip to content

[BUG][CRASH] Using paste all before #5312

Open
@trink

Description

@trink

Version of Kakoune

Kakoune 2024.05.18-278-g92260722

Reproducer

Use this file:


a b
    c
  1. % # select all
  2. <a-J> # join selected lines and select spaces inserted in place of line breaks
  3. u # undo
  4. d # delete
  5. <a-P> # paste all before (debug will assert here)

In the release build different operations after the paste will generally cause a malloc error
6. <a-l> # select to line end
7. <a-(> # rotate content selection backward (the bad_alloc is thrown here)

Outcome

Debug

Fatal error: assert failed "change.begin >= cur_pos" at src/changes.cc:7

Release

uncaught exception (St9bad_alloc):
std::bad_alloc

Expectations

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions