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) {