]> git.proxmox.com Git - mirror_xterm.js.git/blobdiff - src/xterm.js
Merge remote-tracking branch 'upstream/master' into 478_cursorBlink_refresh
[mirror_xterm.js.git] / src / xterm.js
index 353b96185885edb2988af4c131d36ffe49164f86..6649a0333f8d4f8f2e85830a152d562feae99468 100644 (file)
@@ -425,6 +425,9 @@ Terminal.prototype.setOption = function(key, value) {
   }
   this[key] = value;
   this.options[key] = value;
+  switch (key) {
+    case 'cursorBlink': this.element.classList.toggle('xterm-cursor-blink', value); break;
+  }
 };
 
 /**
@@ -581,6 +584,7 @@ Terminal.prototype.open = function(parent) {
   this.element.classList.add('terminal');
   this.element.classList.add('xterm');
   this.element.classList.add('xterm-theme-' + this.theme);
+  this.element.classList.toggle('xterm-cursor-blink', this.options.cursorBlink);
 
   this.element.style.height
   this.element.setAttribute('tabindex', 0);
@@ -1193,11 +1197,7 @@ Terminal.prototype.refresh = function(start, end) {
         }
         if (data !== this.defAttr) {
           if (data === -1) {
-            out += '<span class="reverse-video terminal-cursor';
-            if (this.cursorBlink) {
-              out += ' blinking';
-            }
-            out += '">';
+            out += '<span class="reverse-video terminal-cursor">';
           } else {
             var classNames = [];