Skip to content

Conversation

joyceerhl
Copy link
Contributor

Fix #7157

@joyceerhl joyceerhl requested a review from a team as a code owner August 19, 2021 21:29
@joyceerhl joyceerhl requested a review from rebornix August 19, 2021 21:29
package.json Outdated
@@ -197,6 +197,11 @@
"when": "resourceScheme == 'vscode-interactive'",
"command": "interactive.execute"
},
{
"key": "escape",
"when": "resourceScheme == 'vscode-interactive' && !suggestWidgetVisible",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need to include !editorHoverVisible, !exceptionWidgetVisible, !editorHasMultipleSelections, !inlineSuggestionVisible, !isComposing, !inSnippetMode, !parameterHintsVisible, !renameInputVisible. (I went through default keybindings for Escape.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing that out, I went through the default keybindings for escape and came up with this list. IIRC there was a problem with excessively complex when clauses resulting in perf problems, and I'm not sure all of these are strictly required:

resourceScheme == 'vscode-interactive' &&
!editorHoverVisible &&
!suggestWidgetVisible &&
!isComposing &&
!inSnippetMode &&
!exceptionWidgetVisible &&
!selectionAnchorSet &&
!LinkedEditingInputVisible &&
!renameInputVisible &&
!editorHasSelection &&
!accessibilityHelpWidgetVisible &&
!breakpointWidgetVisible &&
!findWidgetVisible &&
!markersNavigationVisible &&
!parameterHintsVisible &&
!editorHasMultipleSelections &&
!notificationToastsVisible

@codecov-commenter
Copy link

codecov-commenter commented Aug 20, 2021

Codecov Report

Merging #7208 (eab5e5b) into main (4f03a5a) will increase coverage by 0%.
The diff coverage is n/a.

@@          Coverage Diff          @@
##            main   #7208   +/-   ##
=====================================
  Coverage     64%     64%           
=====================================
  Files        359     360    +1     
  Lines      22656   22564   -92     
  Branches    3416    3401   -15     
=====================================
- Hits       14638   14622   -16     
+ Misses      6718    6641   -77     
- Partials    1300    1301    +1     
Impacted Files Coverage Δ
...e/interactive-ipynb/nativeEditorCommandListener.ts 44% <0%> (-5%) ⬇️
src/client/datascience/jupyter/jupyterNotebook.ts 51% <0%> (-4%) ⬇️
...ience/notebook/emptyNotebookCellLanguageService.ts 72% <0%> (-4%) ⬇️
src/client/datascience/notebook/notebookEditor.ts 36% <0%> (-4%) ⬇️
...client/datascience/kernel-launcher/kernelDaemon.ts 53% <0%> (-2%) ⬇️
...ent/datascience/notebook/notebookEditorProvider.ts 82% <0%> (-2%) ⬇️
src/client/datascience/baseJupyterSession.ts 62% <0%> (-1%) ⬇️
src/client/datascience/types.ts 100% <0%> (ø)
...eractive-window/nativeInteractiveWindowProvider.ts 41% <0%> (ø)
...tascience/jupyter/kernels/kernelCommandListener.ts 58% <0%> (ø)
... and 7 more

@joyceerhl joyceerhl requested a review from rebornix August 20, 2021 16:09
@joyceerhl joyceerhl merged commit bfa29be into main Aug 20, 2021
@joyceerhl joyceerhl deleted the dev/joyceerhl/interactive-esc branch August 20, 2021 17:12
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.

Esc and Ctrl+U no longer clear the contents of the interactive window input box
5 participants