mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-27 10:37:38 +01:00
nes: turn off emitFastEditAtCursor for long-distance NES (#1581)
* nes: minor refactor * nes: turn off emitFastEditAtCursor for long-distance NES
This commit is contained in:
committed by
GitHub
parent
d37d891460
commit
220f07bbd7
@@ -305,13 +305,15 @@ export class NextEditProvider extends Disposable implements INextEditProvider<Ne
|
||||
assert(currentDocument !== undefined, 'should be defined if edit is defined');
|
||||
|
||||
telemetryBuilder.setStatus('notAccepted'); // Acceptance pending.
|
||||
|
||||
const showRangePreference = this._statelessNextEditProvider.showNextEditPreference ?? ShowNextEditPreference.AroundEdit;
|
||||
|
||||
let nextEditResult: NextEditResult;
|
||||
if (!showLabel || selections.length < 1) {
|
||||
const currentSelection = selections.at(0);
|
||||
if (!showLabel || currentSelection === undefined) {
|
||||
nextEditResult = new NextEditResult(logContext.requestId, req, { edit, showRangePreference, documentBeforeEdits: currentDocument, targetDocumentId });
|
||||
} else {
|
||||
const transformer = documentAtInvocationTime.getTransformer();
|
||||
const currentSelection = selections[0];
|
||||
const currentCursorPosition = transformer.getRange(currentSelection);
|
||||
|
||||
const editPosition = transformer.getRange(edit.replaceRange);
|
||||
|
||||
@@ -759,7 +759,9 @@ export class XtabProvider implements IStatelessNextEditProvider {
|
||||
}
|
||||
|
||||
const diffOptions: ResponseProcessor.DiffParams = {
|
||||
emitFastCursorLineChange: this.configService.getExperimentBasedConfig(ConfigKey.Internal.InlineEditsXtabProviderEmitFastCursorLineChange, this.expService),
|
||||
emitFastCursorLineChange: opts.showLabel
|
||||
? false
|
||||
: this.configService.getExperimentBasedConfig(ConfigKey.Internal.InlineEditsXtabProviderEmitFastCursorLineChange, this.expService),
|
||||
nLinesToConverge: this.configService.getExperimentBasedConfig(ConfigKey.Internal.InlineEditsXtabNNonSignificantLinesToConverge, this.expService),
|
||||
nSignificantLinesToConverge: this.configService.getExperimentBasedConfig(ConfigKey.Internal.InlineEditsXtabNSignificantLinesToConverge, this.expService),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user