bug-ed
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A one line change I wish to see by default.


From: Zeke Williams
Subject: A one line change I wish to see by default.
Date: Fri, 27 Oct 2023 09:18:39 -0400

One thing that really grinds my gears about ed is how regardless if
you have a prompt enabled or not, it will print the stdout line(s) and
the prompt on separate lines.
So
*
If
*
You
*
Are
*
Going
*
Through
*
Line
*
By
*
Line
*
It
*
Becomes
*
Incredibly
*
Obnoxious.
*

This is not a flaw of ed, because it doesn't use a means of terminal
control such as ncurses, which is what emacs and vim, and even the vim
implementation of ex use, it can only just print to stdout and be done
with it. I was considering using ANSI escape codes to make it possible
to have the prompt stay at the very bottom and the stdout printed
always above it, but I feel it might get too messy and ugly and hacky.
Not to mention, be less portable overall. So I came up with a
compromise, just modify line 76 of io.c, which says putchar('\n') and
that's what tells ed to print a new line after the stdout be it a
single line or a range of lines is done. I'm proposing switching that
from \n to just printf("     ") or something along the lines of that,
a few spaces at the end to make going through a few lines much more
clean and less breaking flow of the document. What do you guys say? If
you know a cleaner and more effective solution to this issue of mine,
I'm all ears.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]