Vscode: Mac services not picking up selected text from editor

Created on 1 Jun 2017  路  7Comments  路  Source: microsoft/vscode

Testing #1628

steps to reproduce

  • On a mac, open a text file and try selecting a line of text in the editor
  • Run the create sticky note service. This is under the code -> Services menu or can be triggered with cmd + shift + y

Expected
The selected text in the editor is opened in a new sticky note

Actual
Some other text is opened in the new sticky note. I'm not sure where we are getting it from

editor-input feature-request help wanted mac workbench-os-integration

Most helpful comment

I can't even get that far. MacOS Services keyboard shortcut has no behavior, and if I were to highlight text, and use the context menu (by right-clicking the text), the Services menu is not found at all, as if #1628 hadn't been implemented at all.

VSCode 1.16.1
MacOS 10.12.6

All 7 comments

@alexandrudima, assigning to you initially as this seems like it may be related to the editor and textinputs/textareas. Feel free to reassign if you think someone else on the team may be the better owner for this

I can't even get that far. MacOS Services keyboard shortcut has no behavior, and if I were to highlight text, and use the context menu (by right-clicking the text), the Services menu is not found at all, as if #1628 hadn't been implemented at all.

VSCode 1.16.1
MacOS 10.12.6

On macOS 10.14.1 (Mojave) and the latest VSCode, I see the same issue.

  • No Services menu in the right-click when text is selected
  • The macOS Code -> Services menu says "No Services Apply"

In Slack, the macOS Slack -> Services menu works fine. The system menu in Microsoft Teams (Teams -> Services) also works when text is selected. (Mentioning those two because I they also use Electron. Neither properly show the Services menu in right-click, but at least the top level menu works.)

Seeing same behaviours as @tgharold as well, on macOS 10.14.5 and latest VSCode (1.36.1).
Frustrating!

As noted in https://github.com/microsoft/vscode/issues/53440#issuecomment-507017517, Services work correctly for text in non-editor fields. So as a workaround, I enter text into the Find dialog, and select the Code/Services menu item.

any updates on this? using Version: 1.41.1 on mac 10.15.2 and no services menu anywhere, even for text inside the "find" menu

@kevinslin There are two issues here: Whether the Services menu appears on right-click, and whether VS Code properly assigns the Services context for selected text.

In the Find/Replace sheet, those text fields do properly set the context, and if you go to the Code > Services menu item in the menu bar, any text services you have there will be available and work fine. But this is not true of the actual editor, which of course is where you'd most want to use text services in the first place.

The Services menu item doesn't appear on any _right-click_ menus, no matter what area. But this is a minor, secondary issue compared to the one this ticket refers to, where text services can't be used in editor text at all.

Was this page helpful?
0 / 5 - 0 ratings