From 8671b6aa5d5d0cff3607116191c5049261884f08 Mon Sep 17 00:00:00 2001 From: Lucy Zhang Date: Fri, 15 Jan 2021 08:24:06 -0800 Subject: [PATCH] Fix redo keyboard shortcut in notebook markdown (#13967) * add cmd+y for redo * add ctrl+shift+z for redo * remove listener for redo when in markdown mode --- .../contrib/notebook/browser/cellViews/textCell.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sql/workbench/contrib/notebook/browser/cellViews/textCell.component.ts b/src/sql/workbench/contrib/notebook/browser/cellViews/textCell.component.ts index 9815076b9b..4f8d512d5c 100644 --- a/src/sql/workbench/contrib/notebook/browser/cellViews/textCell.component.ts +++ b/src/sql/workbench/contrib/notebook/browser/cellViews/textCell.component.ts @@ -71,7 +71,7 @@ export class TextCellComponent extends CellView implements OnInit, OnChanges { // select the active . if ((e.ctrlKey || e.metaKey) && e.key === 'a') { preventDefaultAndExecCommand(e, 'selectAll'); - } else if ((e.metaKey && e.shiftKey && e.key === 'z') || (e.ctrlKey && e.key === 'y')) { + } else if ((e.metaKey && e.shiftKey && e.key === 'z') || (e.ctrlKey && e.key === 'y') && !this.markdownMode) { preventDefaultAndExecCommand(e, 'redo'); } else if ((e.ctrlKey || e.metaKey) && e.key === 'z') { preventDefaultAndExecCommand(e, 'undo');