mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Disables rendering visible whitespace due to feedback. This makes ghost text less real.
This commit is contained in:
parent
7cd53df7d7
commit
6832b7ec4b
|
@ -178,9 +178,8 @@ export class GhostTextWidget extends Disposable {
|
||||||
const line = this.editor.getModel()?.getLineContent(renderData.position.lineNumber) || '';
|
const line = this.editor.getModel()?.getLineContent(renderData.position.lineNumber) || '';
|
||||||
const linePrefix = line.substr(0, renderData.position.column - 1);
|
const linePrefix = line.substr(0, renderData.position.column - 1);
|
||||||
|
|
||||||
const opts = this.editor.getOptions();
|
// To avoid visual confusion, we don't want to render visible whitespace
|
||||||
const renderWhitespace = opts.get(EditorOption.renderWhitespace);
|
const contentText = renderSingleLineText(renderData.lines[0] || '', linePrefix, renderData.tabSize, false);
|
||||||
const contentText = renderSingleLineText(renderData.lines[0] || '', linePrefix, renderData.tabSize, renderWhitespace === 'all');
|
|
||||||
|
|
||||||
this._codeEditorService.registerDecorationType('ghost-text', this.codeEditorDecorationTypeKey, {
|
this._codeEditorService.registerDecorationType('ghost-text', this.codeEditorDecorationTypeKey, {
|
||||||
after: {
|
after: {
|
||||||
|
@ -273,7 +272,8 @@ export class GhostTextWidget extends Disposable {
|
||||||
const opts = this.editor.getOptions();
|
const opts = this.editor.getOptions();
|
||||||
const disableMonospaceOptimizations = opts.get(EditorOption.disableMonospaceOptimizations);
|
const disableMonospaceOptimizations = opts.get(EditorOption.disableMonospaceOptimizations);
|
||||||
const stopRenderingLineAfter = opts.get(EditorOption.stopRenderingLineAfter);
|
const stopRenderingLineAfter = opts.get(EditorOption.stopRenderingLineAfter);
|
||||||
const renderWhitespace = opts.get(EditorOption.renderWhitespace);
|
// To avoid visual confusion, we don't want to render visible whitespace
|
||||||
|
const renderWhitespace = 'none';
|
||||||
const renderControlCharacters = opts.get(EditorOption.renderControlCharacters);
|
const renderControlCharacters = opts.get(EditorOption.renderControlCharacters);
|
||||||
const fontLigatures = opts.get(EditorOption.fontLigatures);
|
const fontLigatures = opts.get(EditorOption.fontLigatures);
|
||||||
const fontInfo = opts.get(EditorOption.fontInfo);
|
const fontInfo = opts.get(EditorOption.fontInfo);
|
||||||
|
|
Loading…
Reference in a new issue