Problem:
Using nvim_set_current_win() to switch windows while in Visual mode
causes E315 ml_get error when target buffer has fewer lines. This
doesn't happen with `:wincmd w` since it properly resets Visual mode
when switching buffers.
Solution:
Reset Visual mode when switching to another buffer, like `:wincmd w`.