Skip to content

Snippets does not undo with repeated placeholders #244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
lopi-py opened this issue Nov 2, 2024 · 0 comments
Closed
2 tasks done

Snippets does not undo with repeated placeholders #244

lopi-py opened this issue Nov 2, 2024 · 0 comments
Labels
accept Applying a completion item to the buffer bug Something isn't working

Comments

@lopi-py
Copy link
Contributor

lopi-py commented Nov 2, 2024

Make sure you have done the following

  • I have updated to the latest version of blink.cmp
  • I have read the README

Bug Description

The snippets undo normally, but if there is a repeated placeholder (${1} in this case), the undo gets stuck

~/.config/snippets/lua.json

{
    "foo": {
        "prefix": "foo",
        "body": [
            "${1:foofoofoo}",
            "",
            "${1}"
        ]
    }
}

steps:

  • nvim a.lua
  • type foo and accept the snippet
  • press esc to enter normal mode
  • press u to undo

Relevant configuration

accept = {
  -- bug happens
  create_undo_point = true,
  -- fine
  create_undo_point = false,
},

neovim version

NVIM v0.10.2

blink.cmp version: branch, tag, or commit

main

@lopi-py lopi-py added the bug Something isn't working label Nov 2, 2024
@Saghen Saghen added the accept Applying a completion item to the buffer label Nov 2, 2024
@Saghen Saghen closed this as completed in f4dcebf Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accept Applying a completion item to the buffer bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants