提交 6251c95a 编写于 作者: I isidor

debug: always remove the selected expression from the view model when wrapping up rename box

fixes #45896
上级 d3cda9c6
......@@ -146,12 +146,11 @@ export function renderRenameBox(debugService: IDebugService, contextViewService:
const wrapUp = once((renamed: boolean) => {
if (!disposed) {
disposed = true;
debugService.getViewModel().setSelectedExpression(undefined);
if (element instanceof Expression && renamed && inputBox.value) {
debugService.renameWatchExpression(element.getId(), inputBox.value);
debugService.getViewModel().setSelectedExpression(undefined);
} else if (element instanceof Expression && !element.name) {
debugService.removeWatchExpressions(element.getId());
debugService.getViewModel().setSelectedExpression(undefined);
} else if (element instanceof Variable) {
element.errorMessage = null;
if (renamed && element.value !== inputBox.value) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册