bobmagicii / vscode-auto-fold

A Visual Studio Code extension to automatically fold code if a magic comment is found.
6 stars 7 forks source link

auto fold while just moving mouse with cmd pressed #3

Open chriswep opened 7 years ago

chriswep commented 7 years ago

like the extension. however for me it is not usable because it trigger auto fold while just moving the mouse when cmd is pressed (what i do often to click on symbols). I failed so far to nail it down in a way that is reproducible. its very strange but it seems to happen only when moving the mouse quite fast.

bobmagicii commented 7 years ago

have you tried disabling the extension, holding cmd, and shaking your mouse? that sounds so fkn weird. makes me wonder if its actually a vs code issue. like there is no mouse code in this extension at all, nor any hooks for cmd. just alt (which is prob option for you)

chriswep commented 7 years ago

yes. it definitely stops when i disable the extension. also, the issue didn't occur before. did some tests again. couldn't make it happen by holding any other key or no key at all. only happens when cmd key is pressed and mouse moving. somehow the auto fold command is triggered by something. (probably its not related to the cmd key itself but other things that become active once the cmd key is pressed)

maybe its some super weird thing about my setup, don't know. maybe you wait until others report the same thing.

bobmagicii commented 7 years ago

i am seeing one thing right now where when i switch back to a tab it re-folds. that normally does not happen. does this sound like it could be a better description of what is happening to you?

bobmagicii commented 7 years ago

i know the story you told didn't really fit this bug, but i did just push 1.0.6 which fixed an issue that has been introduced into code recently where files would refold themselves. please let me know if i also accidentally fixed your problem at the same time.

chriswep commented 7 years ago

still happens, sorry

bobmagicii commented 7 years ago

alright. i'll leave it open. feel free to dump any new ideas you come across, assuming its tolerable to use. still cannot replicate it here.

citosid commented 7 years ago

To me the same problem happens... but it is a little weird. This video shows it:

vs code

So I found the following:

  1. It only happens with classes
  2. It only happens if the class does not have a fully qualified name with namespaces
  3. It does not happen for method of the same class
  4. It does more than folding. Or maybe is the same problem, but it also moves the viewport
bobmagicii commented 7 years ago

i wonder if the intellisense is sending file open signals when trying to load whatever tips it is trying to suggest to you. none of my code ever has hover over highlighting like that video i am not sure how to replicate the setup atm.

or its trying to passively open the file that class is defined in so it can learn about it. but legit i have never seen code ever underline things like that.

citosid commented 7 years ago

@bobmagicii the funny thing is that the moving of the viewport only happens when I have installed/enabled this extension.

For what is worth (and if it is helpful at all), here is the list of the extensions I have installed. That could be helpful:

➔ code --list-extensions
Equinusocio.vsc-material-theme
HookyQR.beautify
Kasik96.format-indent
PKief.material-icon-theme
PeterJausovec.vscode-docker
abusaidm.html-snippets
akamud.vscode-theme-onedark
alefragnani.project-manager
azemoh.one-monokai
azemoh.theme-onedark
bobmagicii.autofoldyeah
dbaeumer.jshint
dbaeumer.vscode-eslint
donjayamanne.githistory
donjayamanne.python
ecmel.vscode-html-css
felixfbecker.php-debug
felixfbecker.php-intellisense
geddski.macros
gerane.Theme-Facebook
gerane.Theme-Peacock
humao.rest-client
johnpapa.Angular1
linyang95.php-symbols
magicstack.MagicPython
ms-vscode.sublime-keybindings
msjsdiag.debugger-for-chrome
neilbrayfield.php-docblocker
onecentlin.laravel-blade
onecentlin.laravel5-snippets
robertohuertasm.vscode-icons
ryannaddy.laravel-artisan
tht13.python
tushortz.python-extended-snippets
zhuangtongfa.Material-theme

Edit

The underlying happens when pressing CMD and hover on the class.

bobmagicii commented 7 years ago

goal in the next week is to add a special debug tab to the output panel, learned how to do it from the intellesense php plugin. hopefully we can get something figured out.

chriswep commented 7 years ago

@citosid i actually have not a single extension in common with you ;-) - so we can rule that out as a cause.

i wonder if the intellisense is sending file open signals when trying to load whatever tips it is trying to suggest to you. none of my code ever has hover over highlighting like that video i am not sure how to replicate the setup atm. or its trying to passively open the file that class is defined in so it can learn about it. but legit i have never seen code ever underline things like that.

well thats exactly what it does when you hold down cmd. i would also expect that vscode opens the corresponding file in the background in that case because i assume it does not have the contents of all files in memory (but only some kind of dependency tree).

bobmagicii commented 7 years ago

changed a bit of my dev process just to try an intellesense plugin that doesnt work over remote filesystems, so i have a local copy on my machine now of the project source. that part of the story does not matter.

i have not been able to actually replicate the problem consistently, but i have accidentally made it happen a few times since. so i think my guess in the last post is getting closer to the issue.

felicio commented 6 years ago

Here https://marketplace.visualstudio.com/items?itemName=felicio.vscode-fold is an extension that tries to solve majority of issues this project faces including this very one. Please, let me know if it's working for you.

ewerybody commented 4 years ago

I have the same thing with Python on Windows. Dunno if it was already mentioned: When holding Ctrl and the cursor is out of sight It popps to the line where the cursor is as soon as I hover over something that can be analysed. So over print: nothing happens. Local variable: nothing happens. Some object method: Zap! It collapses ALL the foldable things.

I actually noticed this when trying to do Go to Definition which I do super often liek Ctrl + LeftClick. Of course it's crazy annoying if the code collapses under your cursor and you need to open the thing again and again. A workaround in this case was: Clicking into the line first and then Ctrl+clicking the object.

cheers: ëRiC