Fixes #78746: use display:inline-block only for whitespace with explicit sizing

This commit is contained in:
Alex Dima 2019-10-25 00:02:58 +02:00
parent 73b3fc4348
commit 5e4d7a8489
No known key found for this signature in database
GPG key ID: 6E58D7B045760DA0
3 changed files with 1 additions and 11 deletions

View file

@ -4,7 +4,6 @@
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./media/editor';
import 'vs/css!./media/tokens';
import * as nls from 'vs/nls';
import * as dom from 'vs/base/browser/dom';
import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent';

View file

@ -1,9 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.monaco-editor .vs-whitespace {
display:inline-block;
}

View file

@ -783,7 +783,7 @@ function _renderLine(input: ResolvedRenderLineInput, sb: IStringBuilder): Render
if (!fontIsMonospace) {
const partIsOnlyWhitespace = (partType === 'vs-whitespace');
if (partIsOnlyWhitespace || !containsForeignElements) {
sb.appendASCIIString(' style="width:');
sb.appendASCIIString(' style="display:inline-block;width:');
sb.appendASCIIString(String(spaceWidth * partContentCnt));
sb.appendASCIIString('px"');
}