Refresh master with initial release/0.24 snapshot (#332)

* Initial port of release/0.24 source code

* Fix additional headers

* Fix a typo in launch.json
This commit is contained in:
Karl Burtram
2017-12-15 15:38:57 -08:00
committed by GitHub
parent 271b3a0b82
commit 6ad0df0e3e
7118 changed files with 107999 additions and 56466 deletions

View File

@@ -110,8 +110,12 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay {
public render(startLineNumber: number, lineNumber: number): string {
if (lineNumber === this._primaryCursorLineNumber) {
if (this._shouldShowCurrentLine()) {
const paintedInMargin = this._willRenderMarginCurrentLine();
const className = 'current-line' + (paintedInMargin ? ' current-line-both' : '');
return (
'<div class="current-line" style="width:'
'<div class="'
+ className
+ '" style="width:'
+ String(Math.max(this._scrollWidth, this._contentWidth))
+ 'px; height:'
+ String(this._lineHeight)
@@ -125,9 +129,18 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay {
}
private _shouldShowCurrentLine(): boolean {
return (this._renderLineHighlight === 'line' || this._renderLineHighlight === 'all') &&
this._selectionIsEmpty &&
this._primaryCursorIsInEditableRange;
return (
(this._renderLineHighlight === 'line' || this._renderLineHighlight === 'all')
&& this._selectionIsEmpty
&& this._primaryCursorIsInEditableRange
);
}
private _willRenderMarginCurrentLine(): boolean {
return (
(this._renderLineHighlight === 'gutter' || this._renderLineHighlight === 'all')
&& this._primaryCursorIsInEditableRange
);
}
}