Skip to content

Commit 95274e5

Browse files
authored
Merge pull request microsoft#180930 from microsoft/joh/universal-pig
joh/universal pig
2 parents 31d7041 + b72905c commit 95274e5

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

src/vs/workbench/contrib/interactiveEditor/browser/interactiveEditorController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ export class InteractiveEditorController implements IEditorContribution {
613613
} else {
614614
// make edits more minimal
615615

616-
const moreMinimalEdits = (await this._editorWorkerService.computeMoreMinimalEdits(textModel.uri, editResponse.localEdits));
616+
const moreMinimalEdits = (await this._editorWorkerService.computeHumanReadableDiff(textModel.uri, editResponse.localEdits));
617617
const editOperations = (moreMinimalEdits ?? editResponse.localEdits).map(edit => EditOperation.replace(Range.lift(edit.range), edit.text));
618618
this._logService.trace('[IE] edits from PROVIDER and after making them MORE MINIMAL', provider.debugName, editResponse.localEdits, moreMinimalEdits);
619619

src/vs/workbench/contrib/interactiveEditor/browser/interactiveEditorDiffWidget.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,15 @@ export class InteractiveEditorDiffWidget extends ZoneWidget {
116116

117117
this._sessionStore.add(this._diffEditor.onDidUpdateDiff(() => {
118118
const result = this._diffEditor.getDiffComputationResult();
119+
const hasFocus = this._diffEditor.hasTextFocus();
119120
this._doShowForChanges(range(), result?.changes2 ?? []);
121+
// TODO@jrieken find a better fix for this. this is the challenge:
122+
// the _doShowForChanges method invokes show of the zone widget which removes and adds the
123+
// zone and overlay parts. this dettaches and reattaches the dom nodes which means they lose
124+
// focus
125+
if (hasFocus) {
126+
this._diffEditor.focus();
127+
}
120128
}));
121129
this._doShowForChanges(range(), changes);
122130
}

src/vs/workbench/contrib/interactiveEditor/browser/interactiveEditorWidget.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ const _inputEditorOptions: IEditorConstructionOptions = {
6666
guides: { indentation: false },
6767
rulers: [],
6868
cursorWidth: 1,
69+
cursorStyle: 'line',
70+
cursorBlinking: 'blink',
6971
wrappingStrategy: 'advanced',
7072
wrappingIndent: 'none',
7173
renderWhitespace: 'none',

0 commit comments

Comments
 (0)