Skip to content
This repository was archived by the owner on Nov 15, 2019. It is now read-only.

Commit a051a0b

Browse files
Improved CodeMirror configuration
1 parent 4710b0e commit a051a0b

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/renderer/components/main/code/index.tsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ const options: any = { //TSC
2121
indentUnit: 2,
2222
indentWithTabs: false,
2323
lineNumbers: false,
24-
lineSeparator: '\n',
2524
lineWrapping: true,
2625
mode: 'noty',
27-
scrollbarStyle: 'null',
26+
scrollbarStyle: 'native',
2827
smartIndent: false,
2928
tabSize: 2,
3029
undoDepth: 1000,
3130
keyMap: 'sublime',
31+
viewportMargin: Infinity,
3232
extraKeys: {
3333
'Backspace': 'delCharBefore',
3434
[`${CTMD}-Z`]: 'undo',
@@ -58,18 +58,12 @@ const options: any = { //TSC
5858
}
5959
};
6060

61+
Utils.defineMode ();
62+
6163
/* CODE */
6264

6365
class Code extends React.Component<any, any> {
6466

65-
constructor ( props ) {
66-
67-
super ( props );
68-
69-
Utils.defineMode ();
70-
71-
}
72-
7367
shouldComponentUpdate ( nextProps ) {
7468

7569
return this.props.id !== nextProps.id;

0 commit comments

Comments
 (0)