diff --git a/butterfly/__init__.py b/butterfly/__init__.py index d04eebe..68c05ab 100644 --- a/butterfly/__init__.py +++ b/butterfly/__init__.py @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . -__version__ = '2.0.0-beta2' +__version__ = '2.0.0-beta4' import os diff --git a/butterfly/static/main.js b/butterfly/static/main.js index b58c8c1..7d7184c 100644 --- a/butterfly/static/main.js +++ b/butterfly/static/main.js @@ -1688,6 +1688,8 @@ this.rows = y || Math.floor(h / this.charSize.height); px = h % this.charSize.height; this.body.style['padding-bottom'] = px + "px"; + this.cols = Math.max(1, this.cols); + this.rows = Math.max(1, this.rows); this.nativeScrollTo(); if ((!x && !y) && oldCols === this.cols && oldRows === this.rows) { return; @@ -1780,7 +1782,7 @@ this.scrollTop = 0; this.scrollBottom = this.rows - 1; this.refresh(true); - if (x || y) { + if (!notif && (x || y)) { return this.reset(); } }; diff --git a/butterfly/templates/motd b/butterfly/templates/motd index 1cdf1a6..4de390e 100644 --- a/butterfly/templates/motd +++ b/butterfly/templates/motd @@ -18,5 +18,5 @@ {{ colors.white }} Y Y {{ colors.light_white }}From:{{ colors.white }} ! ! {{ colors.red if opts.unsecure else colors.green }}{{ butterfly.socket.remote_addr }}:{{ butterfly.socket.remote_port }}{{ colors.reset }} -For more information type: {{ colors.white }}$ {{ colors.green }}butterfly help +For more information type: {{ colors.white }}$ {{ colors.green }}butterfly help{{ colors.reset }} diff --git a/butterfly/themes b/butterfly/themes index 82ead04..4d352b3 160000 --- a/butterfly/themes +++ b/butterfly/themes @@ -1 +1 @@ -Subproject commit 82ead044c27bbfefc12f08cae63dc5f155442dbf +Subproject commit 4d352b32d6857deeafa01e3601959299bda75f0c diff --git a/coffees/term.coffee b/coffees/term.coffee index 848b4c1..2daaebe 100644 --- a/coffees/term.coffee +++ b/coffees/term.coffee @@ -1564,7 +1564,10 @@ class Terminal px = h % @charSize.height @body.style['padding-bottom'] = "#{px}px" + @cols = Math.max 1, @cols + @rows = Math.max 1, @rows @nativeScrollTo() + if (not x and not y) and oldCols == @cols and oldRows == @rows return @@ -1636,7 +1639,7 @@ class Terminal @scrollBottom = @rows - 1 @refresh(true) - @reset() if x or y + @reset() if not notif and (x or y) resizeWindowPlease: (cols) -> # This is only when running butterfly in app mode when resizeTo is available