Skip to content

Commit b65101f

Browse files
committed
fix emacs key binding
1 parent 593d242 commit b65101f

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

browser/components/CodeEditor.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,22 @@ export default class CodeEditor extends React.Component {
4040
this.execHandler = (e) => {
4141
console.log(e.command.name)
4242
switch (e.command.name) {
43+
case 'gotolinestart':
44+
e.preventDefault()
45+
{
46+
let position = this.editor.getCursorPosition()
47+
this.editor.navigateTo(position.row, 0)
48+
}
49+
break
4350
case 'gotolineend':
4451
e.preventDefault()
4552
let position = this.editor.getCursorPosition()
4653
this.editor.navigateTo(position.row, this.editor.getSession().getLine(position.row).length)
4754
break
55+
case 'jumptomatching':
56+
e.preventDefault()
57+
this.editor.navigateUp()
58+
break
4859
case 'removetolineend':
4960
e.preventDefault()
5061
let range = this.editor.getSelectionRange()

browser/main/MainPage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default class MainContainer extends React.Component {
2424
if (window.document.body.style.zoom == null) {
2525
window.document.body.style.zoom = 1
2626
}
27-
console.log(window.document.body.style.zoom)
27+
2828
let zoom = Number(window.document.body.style.zoom)
2929
if (e.deltaY > 0 && zoom < 4) {
3030
document.body.style.zoom = zoom + 0.05

0 commit comments

Comments
 (0)