about summary refs log tree commit diff stats
path: root/src/kilo.c
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-11-06 10:35:50 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-11-06 10:35:50 -0700
commit38d202d68d2db9c8a41927e06940ef9c5da936d8 (patch)
tree608ade3e675d3b46185b096ce0850261a751535f /src/kilo.c
parent0de8ee3911f40eff2289caaccaa182ad6d990908 (diff)
downloadteliva-38d202d68d2db9c8a41927e06940ef9c5da936d8.tar.gz
replace initial help message with a menu
Diffstat (limited to 'src/kilo.c')
-rw-r--r--src/kilo.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/kilo.c b/src/kilo.c
index ce377fe..310e509 100644
--- a/src/kilo.c
+++ b/src/kilo.c
@@ -923,12 +923,11 @@ void editorRefreshScreen(void) {
 
     /* Create a two rows status. First row: */
     abAppend(&ab,"\x1b[0K",4);
-    abAppend(&ab,"\x1b[7m",4);
-    char status[80], rstatus[80];
-    int len = snprintf(status, sizeof(status), "%.20s - %d lines %s",
-        E.filename, E.numrows, E.dirty ? "(modified)" : "");
-    if (len > E.screencols) len = E.screencols;
-    abAppend(&ab,status,len);
+    abAppend(&ab,"  \x1b[7m ^e \x1b[0m run ",19);
+    int len =     2  +     4  +       5;
+    abAppend(&ab,"\x1b[7m ^s \x1b[0m search ",20);
+    len +=               4  +       8;
+    char rstatus[80];
     int rlen = snprintf(rstatus, sizeof(rstatus),
         "%d/%d",E.rowoff+E.cy+1,E.numrows);
     while(len < E.screencols) {
@@ -1264,8 +1263,6 @@ void edit(char* filename) {
     initEditor();
     editorOpen(filename);
     enableRawMode(STDIN_FILENO);
-    editorSetStatusMessage(
-        "HELP: Ctrl-S = save | Ctrl-E = quit | Ctrl-F = find");
     while(!Quit) {
         editorRefreshScreen();
         editorProcessKeypress(STDIN_FILENO);