summaryrefslogtreecommitdiff
path: root/startmode.c
diff options
context:
space:
mode:
authorOskar <[email protected]>2023-10-28 10:54:05 +0200
committerOskar <[email protected]>2023-10-28 10:54:05 +0200
commitc09957c3026aa7f25d7bc7a0379d961990bc9e34 (patch)
treec71abbca0621a1bb76d1bf44dfecef0596d2a8c2 /startmode.c
parent6e381ded456981842994cce8a205bf4259ff95c8 (diff)
modified GET_LINE() to make it return the index of the first character of the line you are focused on
Diffstat (limited to 'startmode.c')
-rw-r--r--startmode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/startmode.c b/startmode.c
index 3c5b606..9744b0b 100644
--- a/startmode.c
+++ b/startmode.c
@@ -73,11 +73,13 @@ int startmode(char filename[]) {
case 'p':
char *line;
- int ret = GET_LINE(filename, focus, &line);
+ size_t start;
+ int ret = GET_LINE(filename, focus, &line, &start);
if (ret == 1) {
return EXIT_FAILURE;
}
printf("%s", line);
+ //printf("%ld", start);
free(line);
break;