From c09957c3026aa7f25d7bc7a0379d961990bc9e34 Mon Sep 17 00:00:00 2001 From: Oskar Date: Sat, 28 Oct 2023 10:54:05 +0200 Subject: modified GET_LINE() to make it return the index of the first character of the line you are focused on --- startmode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'startmode.c') 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; -- cgit v1.2.3