Open simonmandlik opened 7 months ago
Sorry for missing this for... several weeks. The sample config you sent worked well and I was able to reproduce it on my machine. Unfortunately, I have no clue where/why exactly this happened, and I vaguely remember dealing with something like this in a previous issue. I'll take another look; note to myself is to check the save/restore view calls.
Relevant issues/PRs: #278 #299 #312
I did some snooping around with the minimal configuration and I believe I have figured out the problem. The forced redraw in numbertoggle
autocommand is nuking the highlights from the buffer; removing it resolves the issue. This also applies to the highlight when, you enter command mode after creating a visual selection, e.g. :foobarbaz
in nvim -u NONE
vs. nvim -u minimal_config.lua
. I'm not entirely sure what the fix is here, as I imagine the forced redraw is to ensure that the toggled line numbers update properly whenever the mode changes.
Checklist
:h nvim-surround
to see if there might be any relevant information there?Neovim Version
NVIM v0.10.0-dev-2274+g1d5f86f69-Homebrew
Plugin Version
Tagged (Stable)
Minimal Configuration
Sample Buffer
test test test test
Keystroke Sequence