Skip to content

Bug: undo after moving text causes problems #92

Open
@amarz45

Description

@amarz45

If you delete or move text that was affected by colorizer and then undo, the colorizer will be where the cursor was before the undo instead of where it originally was before undoing.

Here are two reproducible examples:

  1. Indent (>>) and then undo (u). You will see that the colorization is one indentation level further than it should be. (See Undo repaint event #71.)
  2. Cut (dd) and then undo (u). You will see that the colorization is one line lower than it should be.

An easy fix is to reload colorizer after every undo. I came up with this neat workaround:

vim.keymap.set("n", "u", "<CMD>undo | ColorizerReloadAllBuffers<CR>")

However, this is a workaround and not a solution.

Operating System: Gentoo GNU/Linux
Neovim Version: 0.7.2
Colorizer Version: 36c610a

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions