File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ( )
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments