Skip to content

Commit

Permalink
Merge branch 'master' into feat/display-url-title
Browse files Browse the repository at this point in the history
# Conflicts:
#	browser/components/CodeEditor.js
#	browser/finder/NoteDetail.js
  • Loading branch information
Antogin committed Feb 5, 2018
2 parents c42ac1d + 8e1bf48 commit a054f12
Show file tree
Hide file tree
Showing 43 changed files with 95 additions and 1,811 deletions.
1 change: 0 additions & 1 deletion .boostnoterc.sample
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"theme": "monokai"
},
"hotkey": {
"toggleFinder": "Cmd + Alt + S",
"toggleMain": "Cmd + Alt + L"
},
"isSideNavFolded": false,
Expand Down
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: node_js
node_js:
- stable
- lts/*
- 6
script:
- npm run lint && npm run test
- 'if [[ ${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH} = "master" ]]; then npm install -g grunt [email protected] && grunt pre-build; fi'
Expand Down
9 changes: 7 additions & 2 deletions browser/components/CodeEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ export default class CodeEditor extends React.Component {

componentDidMount () {
this.value = this.props.value

this.editor = CodeMirror(this.refs.root, {
value: this.props.value,
lineNumbers: true,
lineNumbers: this.props.displayLineNumbers,
lineWrapping: true,
theme: this.props.theme,
indentUnit: this.props.indentSize,
Expand All @@ -71,7 +72,7 @@ export default class CodeEditor extends React.Component {
if (cm.somethingSelected()) cm.indentSelection('add')
else {
const tabs = cm.getOption('indentWithTabs')
if (line.trimLeft().match(/^(-|\*|\+) (\[( |x)\] )?$/)) {
if (line.trimLeft().match(/^(-|\*|\+) (\[( |x)] )?$/)) {
cm.execCommand('goLineStart')
if (tabs) {
cm.execCommand('insertTab')
Expand Down Expand Up @@ -156,6 +157,10 @@ export default class CodeEditor extends React.Component {
this.editor.setOption('indentWithTabs', this.props.indentType !== 'space')
}

if (prevProps.displayLineNumbers !== this.props.displayLineNumbers) {
this.editor.setOption('lineNumbers', this.props.displayLineNumbers)
}

if (prevProps.scrollPastEnd !== this.props.scrollPastEnd) {
this.editor.setOption('scrollPastEnd', this.props.scrollPastEnd)
}
Expand Down
1 change: 1 addition & 0 deletions browser/components/MarkdownEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ class MarkdownEditor extends React.Component {
fontSize={editorFontSize}
indentType={config.editor.indentType}
indentSize={editorIndentSize}
displayLineNumbers={config.editor.displayLineNumbers}
scrollPastEnd={config.editor.scrollPastEnd}
storageKey={storageKey}
fetchUrlTitle={config.editor.fetchUrlTitle}
Expand Down
1 change: 1 addition & 0 deletions browser/components/MarkdownSplitEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class MarkdownSplitEditor extends React.Component {
keyMap={config.editor.keyMap}
fontFamily={config.editor.fontFamily}
fontSize={editorFontSize}
displayLineNumbers={config.editor.displayLineNumbers}
indentType={config.editor.indentType}
indentSize={editorIndentSize}
scrollPastEnd={config.editor.scrollPastEnd}
Expand Down
2 changes: 1 addition & 1 deletion browser/components/TodoListPercentage.styl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.percentageBar
position absolute
top 50px
top 72px
right 0px
left 0px
background-color #DADFE1
Expand Down
156 changes: 0 additions & 156 deletions browser/finder/FinderMain.styl

This file was deleted.

Loading

0 comments on commit a054f12

Please sign in to comment.