summaryrefslogtreecommitdiff
path: root/startmode.c
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-02-11 17:16:52 +0100
committerOskar <[email protected]>2024-02-11 17:16:52 +0100
commitdd8b6d127e366ace19860781b00812e44c0c4a27 (patch)
tree3aa5dad659519add0f5ba8fd01959d62cd581c53 /startmode.c
parentd6b12bc33c2c34a9554480456e2262935a4ea556 (diff)
new + and - feature to increment and decrement the focus. I will make it more advanced.
Diffstat (limited to 'startmode.c')
-rw-r--r--startmode.c8
1 files changed, 8 insertions, 0 deletions
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;