* Rename position x/y stuff to row/col. X/Y were backwards anyway :)

This commit is contained in:
Bryan Ashby 2015-05-18 11:31:35 -06:00
parent 159cdcb763
commit eaa4feeebd
9 changed files with 49 additions and 49 deletions

View file

@ -46,7 +46,7 @@ EditTextView.prototype.onKeyPress = function(key, isSpecial) {
// no shortcuts - redraw the view
this.redraw();
} else {
this.cursorPos.x += 1;
this.cursorPos.row += 1;
if(this.textMaskChar) {
this.client.term.write(this.textMaskChar);
@ -67,15 +67,15 @@ EditTextView.prototype.onSpecialKeyPress = function(keyName) {
if(this.text.length >= this.dimens.width) {
this.redraw();
} else {
this.cursorPos.x -= 1;
if(this.cursorPos.x >= 0) {
this.cursorPos.row -= 1;
if(this.cursorPos.row >= 0) {
this.clientBackspace();
}
}
}
} else if(this.isSpecialKeyMapped('clearLine', keyName)) {
this.text = '';
this.cursorPos.x = 0;
this.cursorPos.row = 0;
this.setFocus(true); // resetting focus will redraw & adjust cursor
}