mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-14 18:46:34 -05:00
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:
@@ -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
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user