mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-29 09:02:37 +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);
|
||||
|
||||
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(){
|
||||
this.setState({
|
||||
|
||||
@@ -164,6 +164,7 @@ module.exports = {
|
||||
:
|
||||
### Actions
|
||||
${_.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;
|
||||
}
|
||||
.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;
|
||||
padding : 0px;
|
||||
margin-bottom : 1em;
|
||||
|
||||
Reference in New Issue
Block a user