Add a global option (or any other suitable mechanism) which restricts the number of lines kakoune’s fifo buffer keeps, which is 0 by default (meaning no limit, like current behaviour). If maximum number of lines is reached, the older text (lines at the beginning of the buffer) are removed. For correctness, this can also happen in case of user input, although user input isn’t the main problem.
Usecase: When running programs in kakoune’s fifo buffers which generate a lot of text, kakoune keeps all the text, unlike terminal emulators which only keep the last n lines of output (1000 by default in case of foot terminal). Although it takes an order of millions of lines to make an impact on memory usage or speed, it still means you cannot have a process outputting text indefinitely.
Issues: Terminal emulators split lines once text reaches the end of the line, so the logic works even for very long single lines. Kakoune doesn’t do that, so this feature will not help in the case the fifo recieves very long line, although that is unusual case.
What do you guys think about this? Is this reasonable?