Code Monkey home page Code Monkey logo

Comments (11)

zacharylayne avatar zacharylayne commented on September 28, 2024 1

I was able to fix it. The problem for me it seemed were hotkey conflicts. It wasn't extremely straightforward to fix, because there were multiple hotkeys conflicting with each other. I remember deleted the conflicting hotkeys from global, text editor, and C# editor and toggling worked.

from collapsecomments.

mrlacey avatar mrlacey commented on September 28, 2024

Someone else reported this separately and we weren't able to find a consistent repo.
We eventually found that it did start working but it was as if the extension took a very long time to load or VS took ages before allowing the shortcut to do anything.

I'll look again.

from collapsecomments.

zacharylayne avatar zacharylayne commented on September 28, 2024

I appreciate the response. If it helps, it DID work up until a week ago before I uninstalled VS, scrubbed a bunch of extensions, and reinstalled.

Any way this could be a bug with the latest Visual Studio releases?

from collapsecomments.

mrlacey avatar mrlacey commented on September 28, 2024

This only started happening with 17.8
but not sure if it's something broken in VS (in which case I'd expect a lot of other extensions and functionality to break)
Or, I'm doing something "odd" that only shows up as a result of changes that happened in 17.8

Either way, I need to find time to do a deep investigation.... :(

from collapsecomments.

LarryAultman avatar LarryAultman commented on September 28, 2024

I am experiencing the same behavior. I have VS2022 17.8.4. the ctrl M-K collapses it all. ctrl A-M-E expands everything.

from collapsecomments.

HexadigmSystems avatar HexadigmSystems commented on September 28, 2024

Similar issue in VS2022_(17.8.5) but only recently installed it and your extension (2.5.1). Using your extension in VS2019 for a long time without issue though (kudos to you!). Issue in VS2022 strange though, Ctrll+M, Ctrl+C doesn't work (works from the context menu though), but if I change it to something else like Ctrl+M, Ctrl+Z (arbitrarily chosen), it does work. Restoring it to Ctrll+M, Ctrl+C again and it stops working again (maybe a conflict with something else assigned to Ctrll+M, Ctrl+C in my environment perhaps?). Tried uninstalling and reinstalling but same problem.

Ctrl+M, Ctrl+D works without issue.

Both Ctrl+M, Ctrl+F and its context menu collapse comments but doesn't expand them again (if that's what it's supposed to do - never use it normally).

Ctrl+M, Ctrl+E not working, but context menu is

FWIW I'm the (extension) developer of this so lots of my own extension experience going back many years. Not sure what might be the cause of your issue though (obscure situation without digging into it but wouldn't surprise me if it's VS, as I've encountered numerous bugs over the years).

from collapsecomments.

mrlacey avatar mrlacey commented on September 28, 2024

Sorry this has taken so long. This thread has also gotten a bit side-tracked too.

Having done some investigation, here's what I've discovered.

  1. Yes, toggling is broken. The internal logic doesn't correctly handle using toggle to expand a comment that is currently collapsed. I'm hoping to have a fix out for this next week.
  2. The "ctrl+M, ctrl+C" combination is highly popular. If there is something else installed (workload or other extension) that registers to use this any attempt to use that shortcut just does nothing. If in this situation, you can manually change the shortcut keys. See details at https://learn.microsoft.com/en-us/visualstudio/ide/identifying-and-customizing-keyboard-shortcuts-in-visual-studio?view=vs-2022#customize-a-keyboard-shortcut
    a. I'm considering changing the default shortcut keys to avoid such issues in the future....

from collapsecomments.

mrlacey avatar mrlacey commented on September 28, 2024

Some upvotes for this would be appreciated: https://developercommunity.visualstudio.com/t/Detecting-and-reporting-conflicting-hotk/10576876?port=1025&fsid=19aef27c-10b1-4e5c-a766-aaf256df55b1&ref=native&refTime=1706867902134&refUserId=91c2bc46-c9e1-43fd-92b1-4ce8bbfc1b78

from collapsecomments.

HexadigmSystems avatar HexadigmSystems commented on September 28, 2024

@mrlacey Appreciate all your efforts! (and upvoted as requested)

from collapsecomments.

mrlacey avatar mrlacey commented on September 28, 2024

HotKey conflicts will explain why a command works from the context menu but not from the hot keys / shortcut.

v2.6 (just released) fixes a bug where the "Toggle" command didn't always work as it should.

from collapsecomments.

HexadigmSystems avatar HexadigmSystems commented on September 28, 2024

Hi Matt,

Downloaded the latest version (2.6) and Ctrl+M, Ctrl+F mostly stable but not always (using VS 17.8.5). Some comments not collapsing sometimes when they should be (while most others are). I say "sometimes" since after playing around with the various hotkeys, it starts working again. Couldn't determine any pattern though. Moreover, on one specific occasion, after expanding one particular comment that wasn't respecting Ctrl+M, Ctrl+F, which looks like this ('.' below representing more occurrences of //):

////////////////////////////////////////////
//
//
.
.
.
////////////////////////////////////////////

It erroneously expanded to the following (one extra line of forward slashes added at the top!). It wasn't a phantom line (still there after saving, closing, and reloading the file):

////////////////////////////////////////////
////////////////////////////////////////////
//
//
.
.
.
////////////////////////////////////////////

No idea if issue is in your code or MSFT's (extra line issue maybe MSFT's I suspect since I assume you wouldn't be doing anything to add an extra line), but something is occasionally unstable (sorry if I've alarmed you but FWIW it seems to be stable most of the time - hard to recreate it).

I'm attaching two C++ files from my own repository here (the ones where I encountered the problem). The attached files are the latest I'm still working on, not yet pushed but likely soon (they contain the latest updates but do compile if it makes any difference - probably not). They contain a lot of comments though ("TypeTraits.h" the much bigger file), so maybe you can play around with them and see if you can reproduce the issue. You''ll need to rename their extensions from ".txt" back to ".h" (Github doesn't allow ".h" files to be uploaded). Just add them to any C++ project (they constitute the entire project documented at the above link).

CompilerVersions.txt
TypeTraits.txt

from collapsecomments.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.