diff options
author | Oskar <[email protected]> | 2024-02-11 17:16:52 +0100 |
---|---|---|
committer | Oskar <[email protected]> | 2024-02-11 17:16:52 +0100 |
commit | dd8b6d127e366ace19860781b00812e44c0c4a27 (patch) | |
tree | 3aa5dad659519add0f5ba8fd01959d62cd581c53 | |
parent | d6b12bc33c2c34a9554480456e2262935a4ea556 (diff) |
new + and - feature to increment and decrement the focus. I will make it more advanced.
-rwxr-xr-x | 7ed | bin | 0 -> 766048 bytes | |||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | startmode.c | 8 |
3 files changed, 9 insertions, 1 deletions
Binary files differ @@ -1,4 +1,4 @@ -CC=gcc +CC=gcc #gcc works best here, mostly because i experienced errors in clang that i dont care to deal with quite yet. CFLAGS=-Wfatal-errors -Wall -Werror -Wextra -g -O2 -static CFLAGS_TESTBIN=-Wfatal-errors -Wall -Werror -Wextra -g -fsanitize=address TARGET=7ed diff --git a/startmode.c b/startmode.c index d90f785..bf948ce 100644 --- a/startmode.c +++ b/startmode.c @@ -68,6 +68,14 @@ int startmode(char filename[]) { if (buf[0] == '\n') { goto firstwhile; // If the user presses enter then we just goto start of the main loop } + if (buf[0] == '+') { // if user inputs + then increment by 1 + Lfocus = focus+1; + break; + } + if (buf[0] == '-') { // If user inputs - then decrement by 1 + Lfocus = focus-1; + break; + } char *endptr; |