Skip to content

Commit 3ecfb51

Browse files
committed
Fix Live Watch showing stale value on immediate re-edit
1 parent 2ef79c9 commit 3ecfb51

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- Fixed Live Watch value editing so boolean literals are accepted and string-like values are escaped correctly when writing running variables.
55
- Fixed Live Watch value editing failing for variables with a display format specifier (e.g. `,h`, `,x`). The format suffix is now stripped before sending the set command to GDB.
66
- Fixed Live Watch variable values not being selectable for copying.
7+
- Fixed Live Watch inline edit showing stale value on immediate re-edit after setting a variable.
78

89
### Changed
910
- Update logo.

src/live-watch-webview/main.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,10 @@ class LiveWatchView {
832832

833833
// Save if changed
834834
if (save && newValue !== currentValue) {
835+
// Optimistic update: show the new value immediately without
836+
// waiting for the async round-trip through the extension host.
837+
node.value = newValue;
838+
valueSpan.textContent = newValue;
835839
this.vscode.postMessage({
836840
type: 'inline-set-value',
837841
nodeId: node.id,

0 commit comments

Comments
 (0)