chrisgrieser / nvim-scissors

Automagical editing and creation of snippets.
MIT License
352 stars 3 forks source link

[Bug]: Attempting to delete prefix moves snippet lines up to prefix #6

Closed zolrath closed 8 months ago

zolrath commented 8 months ago

Bug Description

When deleting a prefix with dd, the prefix line is deleted but the prefix count is not changed. The first line of the snippet instead moves up to the prefix section.

Relevant Screenshot

Before deleting a prefix: image

After deleting a prefix: image

To Reproduce

Create a snippet with multiple prefixes and delete one of the prefixes with dd

neovim version

NVIM v0.9.5

Make sure you have done the following

chrisgrieser commented 8 months ago

Hmm, it seems that this is an unintended side effect of the changed behavior of the divider line through 111e703. Looks like a trade-off, where you have to choose between the unintuitive behavior from #4 or the issue here. Not sure whether this is the intended behavior extmarks, or potentially a bug with nvim core.

For what it's worth, I added a workaround that fixes this issue without re-introducing the behavior from #4.