shithub: drawterm

Download patch

ref: 8bd7505dc37201cbcb99bf4e6b48d938af64bb5b
parent: 3a32c0713dc419c1c7fafc56cbf3d83af832a391
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun May 29 19:14:33 EDT 2016

devcons: simplify line editing logic

--- a/kern/devcons.c	Sun May 29 12:24:39 2016
+++ b/kern/devcons.c	Sun May 29 19:14:33 2016
@@ -626,14 +626,13 @@
 					case 0x15:
 						kbd.x = 0;
 						break;
+					case '\n':
+						kbd.x++;
 					case 0x04:
 						eol = 1;
 						break;
-					case '\n':
-						eol = 1;
 					default:
-						kbd.line[kbd.x++] = ch;
-						break;
+						kbd.x++;
 					}
 				}
 				if(kbd.x == sizeof(kbd.line) || eol){