mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
don't move inline chat zone into selection when changes aren't far away (#216809)
* return (?) of the info icon * don't move inline chat zone into selection when changes aren't far away
This commit is contained in:
parent
ce7105088c
commit
a2cab7255c
|
@ -771,7 +771,19 @@ export class InlineChatController implements IEditorContribution {
|
|||
// real response -> complex...
|
||||
this._ui.value.zone.widget.updateStatus('');
|
||||
|
||||
newPosition = await this._strategy.renderChanges(response);
|
||||
const position = await this._strategy.renderChanges(response);
|
||||
if (position) {
|
||||
// if the selection doesn't start far off we keep the widget at its current position
|
||||
// because it makes reading this nicer
|
||||
const selection = this._editor.getSelection();
|
||||
if (selection?.containsPosition(position)) {
|
||||
if (position.lineNumber - selection.startLineNumber > 8) {
|
||||
newPosition = position;
|
||||
}
|
||||
} else {
|
||||
newPosition = position;
|
||||
}
|
||||
}
|
||||
}
|
||||
this._showWidget(false, newPosition);
|
||||
|
||||
|
|
|
@ -577,7 +577,7 @@ export class LiveStrategy extends EditModeStrategy {
|
|||
message = localize('change.0', "Nothing changed.");
|
||||
} else if (remaining === 1) {
|
||||
message = needsReview
|
||||
? localize('review.1', "Accept or Discard change")
|
||||
? localize('review.1', "$(info) Accept or Discard change")
|
||||
: localize('change.1', "1 change");
|
||||
} else {
|
||||
message = needsReview
|
||||
|
|
Loading…
Reference in a new issue