Skip to content

Bug: Removing ' and ` marks throws errors. #128

@davinosuke

Description

@davinosuke

I have just started to use this plugin, and I stumbled upon this accidentally.

I somehow managed to explicitly set a ` mark, and when I tried to remove it with dm`, I got this error message:

E5108: Error executing lua: vim/_editor.lua:0: nvim_exec2(), line 1: Vim(delmarks):E475: Invalid argument: `
stack traceback:
        [C]: in function 'nvim_exec2'
        vim/_editor.lua: in function 'cmd'
        ...vid/.local/share/nvim/lazy/marks.nvim/lua/marks/mark.lua:110: in function 'delete_mark'
        ...vid/.local/share/nvim/lazy/marks.nvim/lua/marks/init.lua:43: in function <...~.local/share/nvim/lazy/marks.nvim/lua/marks/ini
t.lua:34>

The only relevant setting I have enabled is the keymapping [toggle = "mm"], and when I use it, I get a similar message:

E5108: Error executing lua: vim/_editor.lua:0: nvim_exec2(), line 1: Vim(delmarks):E475: Invalid argument: `
stack traceback:
        [C]: in function 'nvim_exec2'
        vim/_editor.lua: in function 'cmd'
        ...vid/.local/share/nvim/lazy/marks.nvim/lua/marks/mark.lua:110: in function 'delete_mark'
        ...vid/.local/share/nvim/lazy/marks.nvim/lua/marks/mark.lua:138: in function 'delete_line_marks'
        ...vid/.local/share/nvim/lazy/marks.nvim/lua/marks/mark.lua:147: in function 'toggle_mark_cursor'
        ...vid/.local/share/nvim/lazy/marks.nvim/lua/marks/init.lua:30: in function <...~/.local/share/nvim/lazy/marks.nvim/lua/marks/ini
t.lua:28>

I get similar errors on ' and " marks as well.
Yes, I know they are special builtin marks, but you can also set and remove them manually (kind of).
Note that the marks do get removed, they just display the error messages, too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions