I've been trying to track this thing down for a while and I finally figured out how it happens (though I don't know why)
When nvim-notify draws over the line (because of a notification) that context.nvim has drawn across the screen, it will cause nvim to leave visual mode.
This is using the nvim-float presentation only.
Workaround is to use vim.g.context_presenter = 'preview'
edit: vim.g.context_presenter = 'preview' causes issues with telescope so that's a no go.
I've been trying to track this thing down for a while and I finally figured out how it happens (though I don't know why)
When nvim-notify draws over the line (because of a notification) that context.nvim has drawn across the screen, it will cause nvim to leave visual mode.
This is using the nvim-float presentation only.
Workaround is to use
vim.g.context_presenter = 'preview'edit:
vim.g.context_presenter = 'preview'causes issues with telescope so that's a no go.