mirror of
https://github.com/paradoxxxzero/butterfly.git
synced 2026-06-03 10:59:41 +00:00
No need to decrement columns anymore
This commit is contained in:
@@ -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;
|
||||
|
||||
2
butterfly/static/main.min.js
vendored
2
butterfly/static/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user