diff --git a/plugin/local/code/xterm.js b/plugin/local/code/xterm.js index e0535c95..a2ea5f50 100644 --- a/plugin/local/code/xterm.js +++ b/plugin/local/code/xterm.js @@ -64,6 +64,11 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb) { can.page.requireModules if (msg.IsErr()) { can.misc.Warn(msg.Result()) } can.onexport.term(can, term) }) }, _input: function(can, term, data) { + can.runAction(can.request({}, {rows: term.rows, cols: term.cols}, term._item), html.INPUT, [btoa(data)], function(msg) { + if (msg.IsErr()) { can.misc.Warn(msg.Result()) } + }), can._output = term._output + return + if (data == "\u0013") { can._delay = true can.onmotion.delay(can, function() { can._delay && can.runAction(can.request({}, term._item), html.INPUT, [btoa(data)], function(msg) { if (msg.IsErr()) { can.misc.Warn(msg.Result()) } @@ -71,9 +76,10 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb) { can.page.requireModules } else { if (can._delay) { can._delay = false; var msg = can.request({}, {_handle: ice.TRUE}, term._item) can._keylist = can.onkeymap._parse({key: data, _msg: msg}, can, mdb.NORMAL, can._keylist||[], term); return - } can._output = term._output, can.runAction(can.request({}, {rows: term.rows, cols: term.cols}, term._item), html.INPUT, [btoa(data)], function(msg) { + } + can.runAction(can.request({}, {rows: term.rows, cols: term.cols}, term._item), html.INPUT, [btoa(data)], function(msg) { if (msg.IsErr()) { can.misc.Warn(msg.Result()) } - }) + }), can._output = term._output } }, grow: function(can, msg) {