mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-08-02 16:01:55 +02:00
* Try to handle socket error
* Fix bug in wrapping with MultiLineEditText * Updates on message base DB layout/triggers * Detect some terminals via ANSI DSR for device attributes (WIP)
This commit is contained in:
parent
2b963ce6f9
commit
40e0b55424
7 changed files with 83 additions and 11 deletions
|
@ -392,8 +392,9 @@ function MultiLineEditTextView(options) {
|
|||
var absPos;
|
||||
|
||||
if(self.getTextLength(index) > self.dimens.width) {
|
||||
console.log('textLen=' + self.getTextLength(index) + ' / ' + self.dimens.width + ' / ' +
|
||||
JSON.stringify(self.getAbsolutePosition(self.cursorPos.row, self.cursorPos.col)))
|
||||
//console.log('textLen=' + self.getTextLength(index) + ' / ' + self.dimens.width + ' / ' +
|
||||
// JSON.stringify(self.getAbsolutePosition(self.cursorPos.row, self.cursorPos.col)))
|
||||
|
||||
//
|
||||
// Update word wrapping and |cursorOffset| if the cursor
|
||||
// was within the bounds of the wrapped text
|
||||
|
@ -408,22 +409,27 @@ function MultiLineEditTextView(options) {
|
|||
self.redrawRows(self.cursorPos.row, self.dimens.height);
|
||||
|
||||
if(!_.isUndefined(cursorOffset)) {
|
||||
console.log('cursorOffset=' + cursorOffset)
|
||||
//console.log('cursorOffset=' + cursorOffset)
|
||||
self.cursorBeginOfNextLine();
|
||||
self.cursorPos.col += cursorOffset;
|
||||
self.client.term.rawWrite(ansi.right(cursorOffset));
|
||||
} else {
|
||||
//console.log('this path')
|
||||
self.moveClientCusorToCursorPos();
|
||||
/*
|
||||
|
||||
self.cursorPos.row++;
|
||||
self.cursorPos.col = 1; // we just added 1 char
|
||||
absPos = self.getAbsolutePosition(self.cursorPos.row, self.cursorPos.col);
|
||||
console.log('absPos=' + JSON.stringify(absPos))
|
||||
self.client.term.rawWrite(ansi.goto(absPos.row, absPos.col));
|
||||
*/
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// We must only redraw from col -> end of current visible line
|
||||
//
|
||||
console.log('textLen=' + self.getTextLength(index))
|
||||
//console.log('textLen=' + self.getTextLength(index))
|
||||
absPos = self.getAbsolutePosition(self.cursorPos.row, self.cursorPos.col);
|
||||
self.client.term.write(
|
||||
ansi.hideCursor() +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue