Skip to content

Instantly share code, notes, and snippets.

Created April 5, 2010 19:46
Show Gist options
  • Save anonymous/356772 to your computer and use it in GitHub Desktop.
Save anonymous/356772 to your computer and use it in GitHub Desktop.
diff -r ee6fa26017e2 plugins/supported/Editor/views/text.js
--- a/plugins/supported/Editor/views/text.js Mon Mar 29 16:00:05 2010 +0100
+++ b/plugins/supported/Editor/views/text.js Mon Mar 29 17:07:48 2010 -0400
@@ -1087,16 +1087,17 @@ exports.TextView = CanvasView.extend(Mul
tab: function() {
var tabstop = settings.get('tabstop');
var count = tabstop - this._selectedRange.start.column % tabstop;
var str = "";
for (var i = 0; i < count; i++) {
str += " ";
}
+ str += this.getSelectedCharacters();
this._insertText(str);
},
textInserted: function(text) {
if (text === "\n") {
this.newline();
} else {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment