fortran-lang / vscode-fortran-support

Fortran language support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=fortran-lang.linter-gfortran
MIT License
206 stars 30 forks source link

bug(syntax): Selection background on peek definition lingers indefinitely #1067

Closed jpmvferreira closed 6 months ago

jpmvferreira commented 6 months ago

Is there an existing issue for this?

Description

Whenever the command "Peek Definition" is used, the background highlight lingers indefinitely until new code is written. It returns if you switch to a different tab and return to the first one.

Screenshots

If I use "Peek definition" in a Fortran program this happens

https://github.com/fortran-lang/vscode-fortran-support/assets/41581666/c606bcf7-47c0-4b44-a1f2-3dcb3b7fba62

To make sure this is not a more general problem, I've done the same with a Julia script and a C program and got the following result

https://github.com/fortran-lang/vscode-fortran-support/assets/41581666/7bec632a-a957-4e49-84e3-aa94981b3d84

Code Example

No response

Fortran Version (Free/Fixed Form)

Free Form e.g. F90+

Version of Modern Fortran

v3.2.0

Version of Visual Studio Code

v1.87.0

Platform and Architecture

Linux (Manjaro)

Additional Information

Installation was done via the official repositories and system is up to date.

jpmvferreira commented 6 months ago

Okay this seems to be a little more general that this.

Every time I change focus from VS Code to another window and back, it highlights the last word that was written. Once again, this highlight hangs indefinitely until something is modified.

Here's a video showcasing precisely that.

https://github.com/fortran-lang/vscode-fortran-support/assets/41581666/512208c4-25db-4f4b-b099-e20c37d30629

This is not a game breaking bug, but I have to admit, it's very, very, annoying

jpmvferreira commented 6 months ago

Okay I'm going to withdraw this issue it now also started happening to me in files in different programming languages, even with this extension disabled.

Regardless if anybody has some hints on how to debug this I would greatly appreciate it.

gnikit commented 6 months ago

I started replying to you yesterday, but I got pulled away by some other stuff. I wasn't able to replicate the behaviour. What I would suggest is reinstallling/updating vscode.

I know it's a pain, but generally speaking vscode extensions wouldn't be responsible for this highlighting. It a core functionality of the editor.

P.S. syncing your settings to your GitHub account makes it slightly easier to reinstall.