From 4d041411395476053fdf55f6f395ef83060d2196 Mon Sep 17 00:00:00 2001 From: Mathew Pareles Date: Sat, 3 May 2025 17:09:43 -0700 Subject: [PATCH] fix backspace --- src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx b/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx index 6381867b..d91eee88 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx @@ -754,7 +754,7 @@ export const VoidInputBox2 = forwardRef(fun } if (e.key === 'Backspace') { // TODO allow user to undo this. - if (!e.currentTarget.value) { // if there is no text, remove a selection + if (!e.currentTarget.value || (e.currentTarget.selectionStart === 0 && e.currentTarget.selectionEnd === 0)) { // if there is no text or cursor is at position 0, remove a selection if (e.metaKey || e.ctrlKey) { // Ctrl+Backspace = remove all chatThreadService.popStagingSelections(Number.MAX_SAFE_INTEGER) } else { // Backspace = pop 1 selection