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

Loading…
Cancel
Save