Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Cursor jumps up to the "import" line if I move the cursor right after saving when vscode-vim is installed #2300

Closed
agubarev opened this issue Feb 2, 2019 · 6 comments

Comments

@agubarev
Copy link

agubarev commented Feb 2, 2019

Good day everyone,

Now I must say upfront that this only happens when I have vscode-vim installed along with Go.

Cursor jumps to the "import" line if I move the cursor right after saving and if I move again it goes down a bit but not precisely; I'm not even sure it tries to return to its previous place, just jumps like a half screen down. This happens only when the OUTPUT tab is open (on the right side) with "Go Tests" printing its usual output. I guess it's interfering with the editor window somehow.

I've noticed this only yesterday as I've moved back to Linux(Ubuntu 18.10) from MacOS and I've copied only few of my snippets and user settings. Btw, I've worked on this Linux machine for quite a while before spending some time on MacOS, and everything worked perfectly.

I've tested by disabling, reinstalling, deleting all configuration. (including ~/.config/CODE), and also changed to all available go formatters but the problem still persists unfortunately.

Please, help.

@ramya-rao-a
Copy link
Contributor

This happens only when the OUTPUT tab is open (on the right side)

So, this doesn't happen when the output panel is below the editor area?

Can you try disabling the format on save feature and see if this still happens?

Add the below in your settings

"[go]": {
		"editor.formatOnSave": false
	}

@agubarev
Copy link
Author

agubarev commented Feb 3, 2019

Hello.

I did disable format on save but it didn't help. I've posted this here just to get a better chance for 2 parties you and VIM team to figure out what's wrong (if its related to you anyhow)

Someone else confirmed this issue on VIM board while also using VScode+Go+Vim: VSCodeVim/Vim#3444

@agubarev
Copy link
Author

agubarev commented Feb 3, 2019

Btw, I've just started my editor and an error popped: "Error: Error: Illegal value for line", I can't find a way to view this faulty code or more details but it shows "Source: Go (Extension)"

@ramya-rao-a
Copy link
Contributor

Formatting changes the content in the editor, so I thought that could be one reason for the jump in cursor. Good to know that we can rule it out.

What remains is the jump in focus to the output pane. Do you see this same issue when the output pane is below the editor area instead of on the right side?

@ramya-rao-a ramya-rao-a changed the title Cursor jumps up to the "import" line if I move the cursor right after saving. Cursor jumps up to the "import" line if I move the cursor right after saving when vscode-vim is installed Feb 3, 2019
@agubarev
Copy link
Author

agubarev commented Feb 3, 2019

What remains is the jump in focus to the output pane.

No, I haven't check it as it didn't make much sense to me. I've downgraded VIM extension and it's back to normal and everything works.

I've posted on GO extension board for just in case there were some contiguous parts; I haven't delved into vscode extension API thus I have no clue whether is any interference possible. Anyway, thank you for a quick response this Sunday morning :)

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Feb 3, 2019

Can you update VSCodeVim/Vim#3444 with the point about you no longer see this in the downgraded version of the extension?

I'll close this issue for now, as there is nothing much we can do here.

I'll subscribe to VSCodeVim/Vim#3444 though. So that if anyone needs any information on what is happening on the Go side of things, I'll be able to answer there.

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants