When I open Vim without specifying any files, switching to the minimap buffer results in the following error:
Error detected while processing BufEnter Autocommands for "*"..function <SNR>53_
handle_autocmd[23]..<SNR>53_buffer_enter_handler[2]..<SNR>53_minimap_buffer_ente
r_handler:
line 3:
E474: Invalid argument
Press ENTER or type command to continue
This issue occurs because the minimap buffer attempts to move the cursor to an invalid position. This typically happens when s:last_pos is not set correctly. As a result, the cursor() function is called with an empty or zero value, which causes the error.
To reproduce:
Set g:minimap_auto_start to 1 in your vimrc configuration.
Open Vim without specifying any files.
Expected behavior:
Switching to the minimap buffer should not produce any errors, and the cursor should remain in a valid position.
Check list
Environment info
Version info
Question / Problem and steps to reproduce
When I open Vim without specifying any files, switching to the minimap buffer results in the following error:
This issue occurs because the minimap buffer attempts to move the cursor to an invalid position. This typically happens when
s:last_pos
is not set correctly. As a result, thecursor()
function is called with an empty or zero value, which causes the error.To reproduce:
g:minimap_auto_start
to1
in your vimrc configuration.Expected behavior: Switching to the minimap buffer should not produce any errors, and the cursor should remain in a valid position.