Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hansonw committed Mar 5, 2018
2 parents 6db181a + 6276d7c commit 2383454
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion flow-libs/atom.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -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<atom$Marker>,
}
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -874,6 +876,7 @@ declare class atom$TextEditor extends atom$Model {
getDecorations(options?: {class?: string, type?: string}): Array<atom$Decoration>,

// Markers
addMarkerLayer(): atom$DisplayMarkerLayer,
getDefaultMarkerLayer(): atom$DisplayMarkerLayer,
markBufferPosition(position: atom$PointLike, options?: MarkerOptions): atom$Marker,
markBufferRange(range: atom$RangeLike, options?: MarkerOptions): atom$Marker,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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};
}
`;
Expand Down

0 comments on commit 2383454

Please sign in to comment.