From d84e48daea04e59a39c83220a22fa1462d515b0c Mon Sep 17 00:00:00 2001 From: Oskar <> Date: Mon, 15 Apr 2024 19:47:11 +0200 Subject: Bug with 'D' is fixed. Will continue testing. --- TODO | 2 +- editmode.c | 2 +- process_multiples.c | 2 +- test/testgrounds/newlinetest | 15 ++++++++++----- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/TODO b/TODO index 2d85b95..313e77a 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,7 @@ TODO list. This is mostly so i can plan more granularly and remember small stuff i was working on last time and what i should prioritise first. This is not my overall big planning board. (1 highest prio, 10 lowest) -1 - Perform full test of the whole program. (I already found a major bug) +1 - Perform full test of the whole program. 2 - Re-write Makefile to make it easier 2 - Add some quality of life features 3 - Re-write new_line and remove_line_contents for better performance. (They are very inefficient) diff --git a/editmode.c b/editmode.c index 759f9d5..f552f4a 100644 --- a/editmode.c +++ b/editmode.c @@ -267,7 +267,7 @@ int editmode(char filename[], uint64_t focus) { // the editing interface } if (editbuffer[0] == '\n') { - fprintf(stdout, "No changes\n"); + // No changes return 0; } diff --git a/process_multiples.c b/process_multiples.c index 2918aa1..8ddb8c8 100644 --- a/process_multiples.c +++ b/process_multiples.c @@ -393,7 +393,7 @@ uint64_t call_D_plus_continue(char *multiple, uint64_t focus, uint64_t Flines, c remove_line_contents_and_newline(filename, focus); } - return focus-lines_and_newlines_to_remove; + return focus-1; } diff --git a/test/testgrounds/newlinetest b/test/testgrounds/newlinetest index 91fa8e8..2875674 100644 --- a/test/testgrounds/newlinetest +++ b/test/testgrounds/newlinetest @@ -1,5 +1,10 @@ -1 -2 -3 -4 -10 +Yes + + + +six + + + + + -- cgit v1.2.3