No need to decrement columns anymore

This commit is contained in:
Florian Mounier
2014-05-19 12:01:18 +02:00
parent 7f20325b3a
commit cbaa83e722
3 changed files with 5 additions and 5 deletions

View File

@@ -47,7 +47,7 @@
this.compute_char_size();
div.style.height = this.char_size.height + 'px';
term_size = this.parent.getBoundingClientRect();
this.cols = Math.floor(term_size.width / this.char_size.width) - 1;
this.cols = Math.floor(term_size.width / this.char_size.width);
this.rows = Math.floor(term_size.height / this.char_size.height);
i = this.rows - 1;
while (i--) {
@@ -1310,7 +1310,7 @@
old_rows = this.rows;
this.compute_char_size();
term_size = this.parent.getBoundingClientRect();
this.cols = Math.floor(term_size.width / this.char_size.width) - 1;
this.cols = Math.floor(term_size.width / this.char_size.width);
this.rows = Math.floor(term_size.height / this.char_size.height);
if (old_cols === this.cols && old_rows === this.rows) {
return;

File diff suppressed because one or more lines are too long

View File

@@ -70,7 +70,7 @@ class Terminal
@compute_char_size()
div.style.height = @char_size.height + 'px'
term_size = @parent.getBoundingClientRect()
@cols = Math.floor(term_size.width / @char_size.width) - 1 # ?
@cols = Math.floor(term_size.width / @char_size.width)
@rows = Math.floor(term_size.height / @char_size.height)
i = @rows - 1
@@ -1397,7 +1397,7 @@ class Terminal
old_rows = @rows
@compute_char_size()
term_size = @parent.getBoundingClientRect()
@cols = Math.floor(term_size.width / @char_size.width) - 1 # ?
@cols = Math.floor(term_size.width / @char_size.width)
@rows = Math.floor(term_size.height / @char_size.height)
if old_cols == @cols and old_rows == @rows
return