[OpenBIOS] [commit] r1152 - trunk/openbios-devel/forth/device

repository service svn at openbios.org
Sun Jun 9 14:25:34 CEST 2013


Author: mcayland
Date: Sun Jun  9 14:25:33 2013
New Revision: 1152
URL: http://tracker.coreboot.org/trac/openbios/changeset/1152

Log:
terminal.fs: handle all cursor positioning within the terminal package.

Currently the column positioning is handled by the framebuffer code in
display.fs where it shouldn't really be. This also fixes a crash bug when
window-top is set and a line wraps onto the line beneath it.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>

Modified:
   trunk/openbios-devel/forth/device/display.fs
   trunk/openbios-devel/forth/device/terminal.fs

Modified: trunk/openbios-devel/forth/device/display.fs
==============================================================================
--- trunk/openbios-devel/forth/device/display.fs	Sun Jun  9 14:25:30 2013	(r1151)
+++ trunk/openbios-devel/forth/device/display.fs	Sun Jun  9 14:25:33 2013	(r1152)
@@ -210,20 +210,6 @@
     swap
   then
   fb8-blitmask
-  \ now advance the position
-  column# 1+
-  dup #columns = if
-    drop 0 to column#
-    line# 1+ 
-    dup #lines >= if
-      line#
-      0 to line#
-      1 delete-lines
-    then
-    to line#
-  else
-    to column#
-  then
   ;
 
 : fb8-reset-screen ( -- )

Modified: trunk/openbios-devel/forth/device/terminal.fs
==============================================================================
--- trunk/openbios-devel/forth/device/terminal.fs	Sun Jun  9 14:25:30 2013	(r1151)
+++ trunk/openbios-devel/forth/device/terminal.fs	Sun Jun  9 14:25:33 2013	(r1152)
@@ -229,12 +229,13 @@
     then
   endof
   a of \ LF
-    line# 1+ to line# 0 to column# 
+    line# 1+ to line#
+    0 to column#
     line# #lines >= if
-      line# 1-
       0 to line#
       1 delete-lines
-      to line#
+      #lines 1- to line#
+      toggle-cursor exit
     then
   endof
   b of \ VT
@@ -253,7 +254,21 @@
     1b (sequence) c!
     1 to (escseq)
   endof
+
+  \ draw character and advance position
+  column# #columns >= if
+    0 to column#
+    line# 1+ to line#
+    line# #lines >= if
+      0 to line#
+      1 delete-lines
+      #lines 1- to line#
+    then
+  then
+
   dup draw-character
+  column# 1+ to column#
+
   endcase
   toggle-cursor
   ;



More information about the OpenBIOS mailing list