Skip to content

Commit 025c548

Browse files
authored
Resolve keybinding conflict for code cells in .R files (#8888)
Addresses #8637 ### Release Notes <!-- Optionally, replace `N/A` with text to be included in the next release notes. The `N/A` bullets are ignored. If you refer to one or more Positron issues, these issues are used to collect information about the feature or bugfix, such as the relevant language pack as determined by Github labels of type `lang: `. The note will automatically be tagged with the language. These notes are typically filled by the Positron team. If you are an external contributor, you may ignore this section. --> #### New Features - N/A #### Bug Fixes - Resolve keyboard shortcut conflict for code cells in `.R` files (#8637) ### QA Notes If you have R code like this in a regular `.R` file, with your cursor in one of the code cells: ```r # %% plot(1:10) # %% sample(1:100, 10) # %% plot(pressure) ``` the keyboard shortcut <kbd>Cmd/Ctrl+Shift+Enter</kbd> should run the current code cell, and should _not_ `source()` the current file. You can still `source()` the current file from the editor action bar, the context menu, the command palette, etc.
1 parent bb6ef51 commit 025c548

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/positron-r/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@
485485
"command": "r.sourceCurrentFile",
486486
"key": "ctrl+shift+enter",
487487
"mac": "cmd+shift+enter",
488-
"when": "editorLangId == r && !isRPackage"
488+
"when": "editorLangId == r && !isRPackage && !positron.hasCodeCells"
489489
},
490490
{
491491
"command": "r.insertSection",

0 commit comments

Comments
 (0)