From 5cf2fe46d9f17093c57ac623d14ee844f16537c7 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Tue, 26 Jan 2016 00:43:09 +0000 Subject: [PATCH] Fixed bug in automatic text scrolling. git-svn-id: svn://kolibrios.org@6097 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/network/ircc/ircc.asm | 2 +- programs/network/ircc/textbox.inc | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/programs/network/ircc/ircc.asm b/programs/network/ircc/ircc.asm index 168b2f47c0..d49186b26d 100644 --- a/programs/network/ircc/ircc.asm +++ b/programs/network/ircc/ircc.asm @@ -13,7 +13,7 @@ ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -version equ '0.26' +version equ '0.27' ; connection status STATUS_DISCONNECTED = 0 diff --git a/programs/network/ircc/textbox.inc b/programs/network/ircc/textbox.inc index d25a3c252e..05db494d9e 100644 --- a/programs/network/ircc/textbox.inc +++ b/programs/network/ircc/textbox.inc @@ -207,7 +207,10 @@ draw_channel_text: ; Scrollbar was at lowest position, scroll down automatically when new text arrived. mov edx, [edi + window.text_lines] sub edx, [textbox_height] - jle .noscroll ; There are less lines of text than fit into the window, dont scroll.. + jg @f + mov [edi + window.text_line_print], 0 + jmp .noscroll ; There are less lines of text than fit into the window, dont scroll.. + @@: sub edx, [edi + window.text_line_print] je .noscroll ; We are already at the bottom pos, dont scroll.. .scroll_to_pos: ; edx = number of lines to go up/down (flags must indicate direction) @@ -215,7 +218,7 @@ draw_channel_text: add [edi + window.text_line_print], edx mov esi, [edi + window.text_print] popf - ja .loop_forward + jg .loop_forward std ; set direction flag so we can scan backwards dec esi dec esi ; move our cursor just in front of newline, for scanning backwards