diff --git a/src/layer/Text.js b/src/layer/Text.js
index 7fbd8c35..a831a2e8 100644
--- a/src/layer/Text.js
+++ b/src/layer/Text.js
@@ -10,9 +10,11 @@ ace.layer.Text = function(parentEl) {
(function() {
-// this.ENTER_CHAR = "¶";
- this.ENTER_CHAR = "¬";
- this.TAB_CHAR = "‣";
+// this.EOF_CHAR = "¶";
+ this.EOF_CHAR = "¶";
+ this.EOL_CHAR = "¬";
+// this.TAB_CHAR = "‣";
+ this.TAB_CHAR = "→";
this.setTokenizer = function(tokenizer) {
this.tokenizer = tokenizer;
@@ -59,7 +61,12 @@ ace.layer.Text = function(parentEl) {
this.$computeTabString = function() {
var tabSize = this.doc.getTabSize();
if (this.$showInvisibles) {
- this.$tabString = "" + this.TAB_CHAR + new Array(tabSize).join(" ") + "";
+ var halfTab = (tabSize) / 2;
+ this.$tabString = ""
+ + new Array(Math.floor(halfTab)).join(" ")
+ + this.TAB_CHAR
+ + new Array(Math.ceil(halfTab)+1).join(" ")
+ + "";
} else {
this.$tabString = new Array(tabSize+1).join(" ");
}
@@ -103,7 +110,7 @@ ace.layer.Text = function(parentEl) {
var output = token.value
.replace(/&/g, "&")
.replace(/" + this.ENTER_CHAR + "");
+ if (this.$showInvisibles) {
+ if (row !== this.doc.getLength() - 1) {
+ stringBuilder.push("" + this.EOL_CHAR + "");
+ } else {
+ stringBuilder.push("" + this.EOF_CHAR + "");
+ }
+ }
};
}).call(ace.layer.Text.prototype);
\ No newline at end of file