Skip to content

[playground] fix compile hotkey combo adds extra symbol to the code#539

Merged
ukorvl merged 1 commit intomainfrom
fix-compile-btn-adds-a-symbol
Mar 12, 2025
Merged

[playground] fix compile hotkey combo adds extra symbol to the code#539
ukorvl merged 1 commit intomainfrom
fix-compile-btn-adds-a-symbol

Conversation

@ukorvl
Copy link
Copy Markdown
Contributor

@ukorvl ukorvl commented Mar 12, 2025

closes #167

As described in the #167, currently we have a problem with compile hotkey (meta+enter or cmd+enter) when user focuses code field.
This diff adds keymap extension that allows to define custom keyboard shortcuts (key bindings). By setting run: () => true, we prevent any action on the code field. At the same time we run compile() event avoiding adding extra symbols to the code.
We need to use Prec.highest() because the extension should always go first in the extensions list.

@ukorvl ukorvl added the playground Related to playground interface label Mar 12, 2025
@ukorvl ukorvl requested a review from Rolaman March 12, 2025 12:56
@ukorvl ukorvl self-assigned this Mar 12, 2025
@ukorvl ukorvl requested a review from KlonD90 as a code owner March 12, 2025 12:56
@ukorvl ukorvl force-pushed the fix-compile-btn-adds-a-symbol branch from b6e88e0 to 427f1ef Compare March 12, 2025 13:11
@ukorvl ukorvl added this pull request to the merge queue Mar 12, 2025
Merged via the queue into main with commit 44bf5c7 Mar 12, 2025
14 checks passed
@ukorvl ukorvl deleted the fix-compile-btn-adds-a-symbol branch March 12, 2025 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

playground Related to playground interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compile button in explorer hotkey press adds a symbol to code

2 participants