Skip to content
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

Bug: undo after moving text causes problems #92

Open
amarakon opened this issue Sep 24, 2022 · 1 comment
Open

Bug: undo after moving text causes problems #92

amarakon opened this issue Sep 24, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@amarakon
Copy link

amarakon commented Sep 24, 2022

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

@amarakon amarakon added the bug Something isn't working label Sep 24, 2022
@coffebar
Copy link

coffebar commented Dec 5, 2022

When colorized text is moved to another line, color moves somewhere. I go to insert mode, then press and get messed up colors:

image

UPD: this fork has fixed this bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants