From 552f620c2c88783ba31f0342c4aea57063c0f593 Mon Sep 17 00:00:00 2001 From: minjaesong Date: Sat, 10 Apr 2021 17:24:43 +0900 Subject: [PATCH] edit.js to shitty newline --- assets/disk0/tvdos/bin/edit.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/assets/disk0/tvdos/bin/edit.js b/assets/disk0/tvdos/bin/edit.js index a7c1bb9..b94b312 100644 --- a/assets/disk0/tvdos/bin/edit.js +++ b/assets/disk0/tvdos/bin/edit.js @@ -217,6 +217,16 @@ function appendText(code) { gotoText(); } +function appendLine() { + textbuffer.push(""); + cursorRow += 1; + cursorCol = 0; + drawLnCol(); + gotoText(); + + // TODO touch screen scroll vars +} + reset_status(); drawMain(); drawTextbuffer(); @@ -238,6 +248,11 @@ while (!exit) { writeout(); displayBulletin(`Wrote ${textbuffer.length} lines`); } + else if (key == 8) { // Bksp + } + else if (key == 13) { // Return / ^M + appendLine(); + } else if (key >= 32) { // printables (excludes \n) if (bulletinShown) { dismissBulletin();