Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Commit b4f02c1

Browse files
committed
only call with when having a new position, microsoft/vscode#107710
1 parent ed4e2c6 commit b4f02c1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tree.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@ class TreeInputHistory implements vscode.TreeDataProvider<HistoryItem>{
255255

256256
private _reRunHistoryItem(item: HistoryItem): void {
257257
this._inputs.delete(item.key);
258-
const newInput = item.input.with(item.anchor.guessedTrackedPosition() ?? item.input.location.range.start);
258+
const newPosition = item.anchor.guessedTrackedPosition();
259+
const newInput = newPosition ? item.input.with(newPosition) : item.input;
259260
this._tree.setInput(newInput);
260261
}
261262

0 commit comments

Comments
 (0)