diff --git a/flow-libs/atom.js.flow b/flow-libs/atom.js.flow index c9ca8232..175e8856 100644 --- a/flow-libs/atom.js.flow +++ b/flow-libs/atom.js.flow @@ -240,6 +240,7 @@ declare class atom$DisplayMarkerLayer { destroy(): void, clear(): void, isDestroyed(): boolean, + markBufferPosition(position: atom$PointLike, options?: MarkerOptions): atom$Marker, markBufferRange(range: atom$Range | atom$RangeLike, options: MarkerOptions): atom$Marker, getMarkers(): Array, } @@ -773,7 +774,7 @@ declare class atom$TextEditor extends atom$Model { // Event Subscription onDidChange(callback: () => void): IDisposable, onDidChangePath(callback: (newPath: string) => mixed): IDisposable, - onDidStopChanging(callback: () => void): IDisposable, + onDidStopChanging(callback: () => mixed): IDisposable, onDidChangeCursorPosition(callback: (event: ChangeCursorPositionEvent) => mixed): IDisposable, onDidDestroy(callback: () => mixed): IDisposable, @@ -818,6 +819,7 @@ declare class atom$TextEditor extends atom$Model { getText(): string, getTextInBufferRange(range: atom$RangeLike): string, getLineCount(): number, + getLastScreenRow(): number, // Mutating Text setText(text: string, options?: InsertTextOptions): void, @@ -874,6 +876,7 @@ declare class atom$TextEditor extends atom$Model { getDecorations(options?: {class?: string, type?: string}): Array, // Markers + addMarkerLayer(): atom$DisplayMarkerLayer, getDefaultMarkerLayer(): atom$DisplayMarkerLayer, markBufferPosition(position: atom$PointLike, options?: MarkerOptions): atom$Marker, markBufferRange(range: atom$RangeLike, options?: MarkerOptions): atom$Marker, diff --git a/modules/atom-ide-ui/pkg/atom-ide-global/lib/backports/installTextEditorStyles.js b/modules/atom-ide-ui/pkg/atom-ide-global/lib/backports/installTextEditorStyles.js index d1dbc4b8..81100d41 100644 --- a/modules/atom-ide-ui/pkg/atom-ide-global/lib/backports/installTextEditorStyles.js +++ b/modules/atom-ide-ui/pkg/atom-ide-global/lib/backports/installTextEditorStyles.js @@ -16,6 +16,8 @@ import {Observable} from 'rxjs'; import invariant from 'assert'; import semver from 'semver'; +const DEFAULT_FONT_STACK = "Menlo, Consolas, 'DejaVu Sans Mono', monospace"; + export default function installTextEditorStyles(): IDisposable { if (semver.gte(atom.appVersion, '1.26.0')) { // this behavior is part of 1.26 and greater @@ -46,7 +48,7 @@ export default function installTextEditorStyles(): IDisposable { const styleSheetSource = ` atom-workspace { --editor-font-size: ${fontSize}px; - --editor-font-family: ${fontFamily}; + --editor-font-family: ${fontFamily || DEFAULT_FONT_STACK}; --editor-line-height: ${lineHeight}; } `;