From 3becfda9760b31c01d48f2c37c631ffc30adfa10 Mon Sep 17 00:00:00 2001 From: Kyle Loveless Date: Wed, 20 Nov 2024 16:16:06 -0600 Subject: [PATCH] begin save as work --- main.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/main.ts b/main.ts index 401dad0..c058c2e 100644 --- a/main.ts +++ b/main.ts @@ -443,6 +443,21 @@ function editorSetStatusMessage(msg: string) { e.statusMsgTime = new Date(); } +// TODO: finish this +function editorPrompt(prompt: string) { + let buffer = ""; + + while (true) { + const msg = sprintf(prompt, buffer); + editorSetStatusMessage(msg); + editorRefreshScreen(); + + const char = editorReadKey(); + + + } +} + function editorMoveCursor(key: string | number) { let row = (e.cursorY >= e.numRows) ? undefined : e.row[e.cursorY]; switch (key) {