mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 06:34:41 +02:00
* Start work on TextBuffer version of MLTEV
This commit is contained in:
parent
d7b49e73b3
commit
c8c7566fd3
4 changed files with 253 additions and 2 deletions
|
@ -88,7 +88,7 @@ function MultiLineEditTextView(options) {
|
|||
View.call(this, options);
|
||||
|
||||
//
|
||||
// defualt tabWidth is 4
|
||||
// defualt tabWidth is 8
|
||||
// See the following:
|
||||
// * http://www.ansi-bbs.org/ansi-bbs2/control_chars/
|
||||
// * http://www.bbsdocumentary.com/library/PROGRAMS/GRAPHICS/ANSI/bansi.txt
|
||||
|
@ -415,6 +415,10 @@ function MultiLineEditTextView(options) {
|
|||
this.insertCharacterAtCurrentPosition = function(c) {
|
||||
var pos = self.getTextBufferPosition(self.cursorPos.row, self.cursorPos.col);
|
||||
self.cursorPos.col++;
|
||||
if(self.cursorPos.col >= self.dimens.width) {
|
||||
self.cursorToStartOfNextLine();
|
||||
|
||||
}
|
||||
self.client.term.write(c);
|
||||
self.textBuffer.insert(pos, c);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue