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

Commit

Permalink
Improved CodeMirror configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiospampinato committed Jan 6, 2019
1 parent 4710b0e commit a051a0b
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/renderer/components/main/code/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ const options: any = { //TSC
indentUnit: 2,
indentWithTabs: false,
lineNumbers: false,
lineSeparator: '\n',
lineWrapping: true,
mode: 'noty',
scrollbarStyle: 'null',
scrollbarStyle: 'native',
smartIndent: false,
tabSize: 2,
undoDepth: 1000,
keyMap: 'sublime',
viewportMargin: Infinity,
extraKeys: {
'Backspace': 'delCharBefore',
[`${CTMD}-Z`]: 'undo',
Expand Down Expand Up @@ -58,18 +58,12 @@ const options: any = { //TSC
}
};

Utils.defineMode ();

/* CODE */

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

constructor ( props ) {

super ( props );

Utils.defineMode ();

}

shouldComponentUpdate ( nextProps ) {

return this.props.id !== nextProps.id;
Expand Down

0 comments on commit a051a0b

Please sign in to comment.