Skip to content
Discussion options

You must be logged in to vote

Note

picker:find doesn't work as expected with the vim_marks finder because it is bound to the current window.

Note

Deleted items are still selected after picker:find.

Revision 1
opts = {
  picker = {
    sources = {
      marks = {
        actions = {
          delmark = function(picker)
            local cursor = picker.list.cursor
            local deleted = {}
            for _, it in ipairs(picker:selected { fallback = true }) do
              local ok = pcall(vim.api.nvim_del_mark, it.label)
              if ok then
                table.insert(deleted, it)
              end
            end
            picker:close()
            local picker_new = Snacks.picker.marks()
            p…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ciza99
Comment options

@drowning-cat
Comment options

Answer selected by ciza99
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants