Coder Social home page Coder Social logo

Comments (6)

usernamehw avatar usernamehw commented on June 15, 2024

Not giving focus to the editor is most likely a VSCode design choice.

Created an issue of VSCode not rendering codicon resulting in an empty menu item: microsoft/vscode#145480

Added a "name" property for status bar items. Added a prefix Commands: to the context menu.

from vscode-commands.

Z-E-D avatar Z-E-D commented on June 15, 2024

Thanks for the update.

I don't think that not giving back focus to the editor is most likely a VSCode design choice:

  1. as I mentioned in the report, there are commands invoked from the statusbar that don't take focus from the editor, e.g. Undo or Go Back;
  2. the commands that are taking the focus when invoked from the statusbar don't do that when they are invoked:
    a) from the menu using the native menu item;
    b) from the toolbar using buttons created by extensions with the same command, e.g. the Save button from ShortcutMenuBar extension doesn't take the focus.

from vscode-commands.

usernamehw avatar usernamehw commented on June 15, 2024

On other side, there are some commands that are not stealing the focus from editor, like these:

  • "Undo" / "Redo",
  • "Go Back" / "Go Forward",
  • "Go to Last Edit Location",
  • "Toggle Split Editor in Group",
    ...

It's possible that these commands just focus the active editor internally unlike other commands.

from vscode-commands.

Z-E-D avatar Z-E-D commented on June 15, 2024

That is inconsistent and unneeded behavior.

And why the Save command give focus back to the editor when invoked from the menu or toolbar, but not the same command when invoked from the statusbar? This is also inconsistent.

from vscode-commands.

Z-E-D avatar Z-E-D commented on June 15, 2024

I just tried. The Save command when executed from the side panel created by your extension is also not giving back the focus to the editor.

from vscode-commands.

usernamehw avatar usernamehw commented on June 15, 2024

I honestly think that the best feature of this extension is running commands from the Quick Pick.

commands.openAsQuickPick - Commands: Open as Quick Pick

It would likely return the focus to editor in all cases bc Quick Pick closes when it runs the command.

https://github.com/usernamehw/vscode-commands#quick-pick-commandsopenasquickpick

from vscode-commands.

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.