vim-import-js icon indicating copy to clipboard operation
vim-import-js copied to clipboard

Restoring cursor position can be incorrect if cursor starts inside import block

Open lencioni opened this issue 8 years ago • 1 comments

When replacing the buffer we track the cursor position and then simply move it by the number of lines that were added. If you happen to be in the imports block, this can be incorrect.

lencioni avatar Jun 24 '17 18:06 lencioni

I think the fix for this involves moving cursor restoration into the import-js plugin itself. The client will send the current position on import start, then import-js will calculate where it should end up after the import is done and send it back in the response.

trotzig avatar Jul 19 '17 07:07 trotzig