[hackers] [lchat] filter/indent: fix lost of last color after new-line || Jan Klemkow

From: <git_AT_suckless.org>
Date: Thu, 20 Nov 2025 22:56:58 +0100 (CET)

commit 58143731f1a6db77f271eed1cd4ada82538ad17b
Author: Jan Klemkow <j.klemkow_AT_wemelug.de>
AuthorDate: Thu Nov 20 22:55:13 2025 +0100
Commit: Jan Klemkow <j.klemkow_AT_wemelug.de>
CommitDate: Thu Nov 20 22:55:13 2025 +0100

    filter/indent: fix lost of last color after new-line
    
    I dont know why its happend, but this is a working fix.

diff --git a/filter/indent.c b/filter/indent.c
index 2f6de3f..a3d4869 100644
--- a/filter/indent.c
+++ b/filter/indent.c
_AT_@ -70,7 +70,7 @@ main(void)
                 while ((word = strsep(&next, " ")) != NULL) {
                         tw -= strlen(word) + 1;
                         if (tw < 0 && !first)
- fputs("\n ", stdout);
+ printf("\n\033[%dm ", color);
                         if (tw < 0)
                                 tw = cols - pw - strlen(word);
 
Received on Thu Nov 20 2025 - 22:56:58 CET

This archive was generated by hypermail 2.3.0 : Thu Nov 20 2025 - 23:01:02 CET