mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-07 09:52:41 +00:00
Make cursor move to end of snippet after insertion
This commit is contained in:
@@ -64,7 +64,7 @@ const Editor = createClass({
|
|||||||
lines[this.cursorPosition.line] = splice(lines[this.cursorPosition.line], this.cursorPosition.ch, injectText);
|
lines[this.cursorPosition.line] = splice(lines[this.cursorPosition.line], this.cursorPosition.ch, injectText);
|
||||||
|
|
||||||
this.handleTextChange(lines.join('\n'));
|
this.handleTextChange(lines.join('\n'));
|
||||||
this.refs.codeEditor.setCursorPosition(this.cursorPosition.line, this.cursorPosition.ch + injectText.length);
|
this.refs.codeEditor.setCursorPosition(this.cursorPosition.line + injectText.split('\n').length, this.cursorPosition.ch + injectText.length);
|
||||||
},
|
},
|
||||||
handgleToggle : function(){
|
handgleToggle : function(){
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ module.exports = {
|
|||||||
:
|
:
|
||||||
### Actions
|
### Actions
|
||||||
${_.times(_.random(genLines, genLines + 2), function(){return genAction();}).join('\n\t\t\t\n\t\t\t')}
|
${_.times(_.random(genLines, genLines + 2), function(){return genAction();}).join('\n\t\t\t\n\t\t\t')}
|
||||||
}}`;
|
}}
|
||||||
|
\n`;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ body {
|
|||||||
margin : 0px -6px 1em;
|
margin : 0px -6px 1em;
|
||||||
}
|
}
|
||||||
.useSansSerif();
|
.useSansSerif();
|
||||||
-webkit-transform : translateZ(0); //Prevents shadows from breaking across columns
|
//-webkit-transform : translateZ(0); //Prevents shadows from breaking across columns, but breaks internal columns...
|
||||||
position : relative;
|
position : relative;
|
||||||
padding : 0px;
|
padding : 0px;
|
||||||
margin-bottom : 1em;
|
margin-bottom : 1em;
|
||||||
|
|||||||
Reference in New Issue
Block a user