fix #1808 show different different indicators for LF and CRLF
This commit is contained in:
parent
3694a02532
commit
45311cda45
3 changed files with 34 additions and 5 deletions
|
|
@ -41,18 +41,31 @@ var Text = function(parentEl) {
|
|||
this.element = dom.createElement("div");
|
||||
this.element.className = "ace_layer ace_text-layer";
|
||||
parentEl.appendChild(this.element);
|
||||
this.$updateEolChar = this.$updateEolChar.bind(this);
|
||||
};
|
||||
|
||||
(function() {
|
||||
|
||||
oop.implement(this, EventEmitter);
|
||||
|
||||
this.EOF_CHAR = "\xB6"; //"¶";
|
||||
this.EOL_CHAR = "\xAC"; //"¬";
|
||||
this.TAB_CHAR = "\u2192"; //"→" "\u21E5";
|
||||
this.SPACE_CHAR = "\xB7"; //"·";
|
||||
this.EOF_CHAR = "\xB6";
|
||||
this.EOL_CHAR_LF = "\xAC";
|
||||
this.EOL_CHAR_CRLF = "\xa4";
|
||||
this.EOL_CHAR = this.EOL_CHAR_LF;
|
||||
this.TAB_CHAR = "\u2192"; //"\u21E5";
|
||||
this.SPACE_CHAR = "\xB7";
|
||||
this.$padding = 0;
|
||||
|
||||
this.$updateEolChar = function() {
|
||||
var EOL_CHAR = this.session.doc.getNewLineCharacter() == "\n"
|
||||
? this.EOL_CHAR_LF
|
||||
: this.EOL_CHAR_CRLF;
|
||||
if (this.EOL_CHAR != EOL_CHAR) {
|
||||
this.EOL_CHAR = EOL_CHAR;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
this.setPadding = function(padding) {
|
||||
this.$padding = padding;
|
||||
this.element.style.padding = "0 " + padding + "px";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue