wm: teppich

Download patch

ref: 7b6019aea1c3710c0d25b6256a236bb000600167
parent: d1001457d857f4c8db216691fc2ecf18febe1912
author: mkf <mkf@cloud9p.org>
date: Sat Nov 25 01:52:48 EST 2023

vga: dynamic \t
previously, each tab was equal to 4 spaces,
now it's equal to a variable number of spaces
(up to 8), depending on where cursor is.
this gives programs using \t a nicer look.

--- a/pc/vga.c
+++ b/pc/vga.c
@@ -88,7 +88,9 @@
 			vga_nl();
 			return;
 		case '\t':
-			for(int i = 0 ; i < 4 ; i++)
+			/* dynamic tab! */	
+			int dst = (vga_col % 8) + 1;
+			for(int i = 0 ; i < dst ; i++)
 				vga_putc(' ');
 			return;
 		case '\b':