Skip to content

Commit f23d94d

Browse files
committed
fix: largeness config
1 parent 372d8d3 commit f23d94d

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

package/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package/main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-commons-atom/editor-largeness.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import { TextEditor } from "atom"
55
* @param editor
66
* @param largeLineCount lineCountIfLarge threashold
77
* @param longLineLength lineLengthIfLongerThan threashold
8-
* @returns the the largness score if editor is large. Otherwise it returns 0
8+
* @returns the largness score if editor is large. Otherwise it returns 0 (a small file)
99
*/
1010
export function largeness(
1111
editor: TextEditor,
12-
largeLineCount: number = atom.config.get("atom-ide-base.longLineLength") || 4000,
13-
longLineLength: number = atom.config.get("atom-ide-base.largeLineCount") / 6 || 3000
12+
largeLineCount: number = atom.config.get("atom-ide-base.largeLineCount") || 4000,
13+
longLineLength: number = atom.config.get("atom-ide-base.longLineLength") || 4000
1414
) {
1515
const lineCount = lineCountIfLarge(editor, largeLineCount)
1616
if (lineCount !== 0) {
@@ -20,14 +20,14 @@ export function largeness(
2020
if (longLine !== 0) {
2121
return longLine
2222
}
23-
return 0
23+
return 0 // small file
2424
}
2525

2626
/**
2727
* Find if an editor has a line that is longer than the given threashold
2828
* @param editor
2929
* @param threashold largeLineCount threashold
30-
* @returns the line count if it is larger than threashold. Otherwise it returns 0
30+
* @returns the line count if it is larger than threashold. Otherwise it returns 0 (a small file)
3131
*/
3232
export function lineCountIfLarge(editor: TextEditor, threashold: number) {
3333
// @ts-ignore

src-package/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const config = {
7171
description:
7272
"If an editor more line numbers than this number, the editor will reduce the expensive operations to help the performance.",
7373
type: "number",
74-
default: 20000,
74+
default: 4000,
7575
order: 11,
7676
},
7777
}

0 commit comments

Comments
 (0)