Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Account for editor.multiCursorModifier setting in Native REPL terminal link #25156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
Loading
from

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Jun 10, 2025

The Native REPL terminal link was hardcoded to show "Ctrl/Cmd click to launch VS Code Native REPL" regardless of the editor.multiCursorModifier setting. This caused confusion when users had changed this setting from the default.

Changes Made

  • Dynamic modifier key detection: The link provider now reads the editor.multiCursorModifier setting to determine the correct modifier key
  • Cross-platform support: Properly handles Mac (Cmd/Option) and Windows/Linux (Ctrl/Alt) platforms
  • Immediate updates: Configuration changes take effect immediately without requiring restart

Behavior

Setting Value Platform Link Text
"alt" (default) Mac "Cmd click to launch VS Code Native REPL"
"alt" (default) Windows/Linux "Ctrl click to launch VS Code Native REPL"
"ctrlCmd" Mac "Option click to launch VS Code Native REPL"
"ctrlCmd" Windows/Linux "Alt click to launch VS Code Native REPL"

Implementation Details

  • Added getModifierKeyText() helper function that reads the configuration and returns the appropriate modifier key text
  • Modified CustomTerminalLinkProvider.provideTerminalLinks() to use dynamic text instead of hardcoded strings
  • Configuration is read fresh on each call, ensuring changes are reflected immediately
  • Maintains backward compatibility - default behavior is unchanged

Testing

Added comprehensive test coverage including:

  • Default behavior verification for both platforms
  • Alternative setting behavior for both platforms
  • Configuration change adaptation
  • Edge cases and error conditions

All existing tests continue to pass, ensuring no regressions were introduced.

Fixes #24750.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits June 10, 2025 04:18
Co-authored-by: anthonykim1 <62267334+anthonykim1@users.noreply.github.com>
Co-authored-by: anthonykim1 <62267334+anthonykim1@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Account for editor.multi-cursor setting for Native REPL link in Terminal Account for editor.multiCursorModifier setting in Native REPL terminal link Jun 10, 2025
@Copilot Copilot AI requested a review from anthonykim1 June 10, 2025 04:24
Copilot finished work on behalf of anthonykim1 June 10, 2025 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Account for editor.multi-cursor setting for Native REPL link in Terminal
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.