pull/111/merge
Ondřej Hruška 7 years ago
parent 9e9539472c
commit f8ebae044a
  1. 21
      html_orig/js/app.js
  2. 21
      html_orig/jssrc/term.js

@ -1567,12 +1567,14 @@ var Screen = (function () {
bg: 0,
attrs: 0,
suppress: false, // do not turn on in blink interval (for safe moving)
forceOn: false,
hidden: false, // do not show
hanging: false, // xenl
};
var screen = [];
var blinkIval;
var cursorFlashStartIval;
var frakturExceptions = {
'C': '\u212d',
@ -1717,7 +1719,7 @@ var Screen = (function () {
}
if (!cursor.suppress) {
_draw(_curCell(), cursor.a);
_draw(_curCell(), cursor.forceOn || cursor.a);
}
}, 500);
@ -1752,6 +1754,8 @@ var Screen = (function () {
if (!inited) _init();
var cursorMoved;
// Set size
num = parse2B(str, i); i += 2; // height
num2 = parse2B(str, i); i += 2; // width
@ -1763,6 +1767,7 @@ var Screen = (function () {
// Cursor position
num = parse2B(str, i); i += 2; // row
num2 = parse2B(str, i); i += 2; // col
cursorMoved = (cursor.x != num2 || cursor.y != num);
cursorSet(num, num2);
// console.log("Cursor at ",num, num2);
@ -1826,9 +1831,17 @@ var Screen = (function () {
_drawAll();
if (!cursor.hidden || cursor.hanging) {
// hide cursor asap
_draw(_curCell(), false);
// if (!cursor.hidden || cursor.hanging || !cursor.suppress) {
// // hide cursor asap
// _draw(_curCell(), false);
// }
if (cursorMoved) {
cursor.forceOn = true;
cursorFlashStartIval = setTimeout(function() {
cursor.forceOn = false;
}, 1200);
_draw(_curCell(), true);
}
}

@ -10,12 +10,14 @@ var Screen = (function () {
bg: 0,
attrs: 0,
suppress: false, // do not turn on in blink interval (for safe moving)
forceOn: false,
hidden: false, // do not show
hanging: false, // xenl
};
var screen = [];
var blinkIval;
var cursorFlashStartIval;
var frakturExceptions = {
'C': '\u212d',
@ -160,7 +162,7 @@ var Screen = (function () {
}
if (!cursor.suppress) {
_draw(_curCell(), cursor.a);
_draw(_curCell(), cursor.forceOn || cursor.a);
}
}, 500);
@ -195,6 +197,8 @@ var Screen = (function () {
if (!inited) _init();
var cursorMoved;
// Set size
num = parse2B(str, i); i += 2; // height
num2 = parse2B(str, i); i += 2; // width
@ -206,6 +210,7 @@ var Screen = (function () {
// Cursor position
num = parse2B(str, i); i += 2; // row
num2 = parse2B(str, i); i += 2; // col
cursorMoved = (cursor.x != num2 || cursor.y != num);
cursorSet(num, num2);
// console.log("Cursor at ",num, num2);
@ -269,9 +274,17 @@ var Screen = (function () {
_drawAll();
if (!cursor.hidden || cursor.hanging) {
// hide cursor asap
_draw(_curCell(), false);
// if (!cursor.hidden || cursor.hanging || !cursor.suppress) {
// // hide cursor asap
// _draw(_curCell(), false);
// }
if (cursorMoved) {
cursor.forceOn = true;
cursorFlashStartIval = setTimeout(function() {
cursor.forceOn = false;
}, 1200);
_draw(_curCell(), true);
}
}

Loading…
Cancel
Save