Andrew L. Moore wrote:
Though documented otherwise in the ed man page (ed.1), the intent of the command `zN' is to set the window size to N, which is persistent
Maybe, but 'z' also prints lines. And I would find it pretty strange that 'zN' prints anything other than N lines.
In your current implementation (1.11rc1), on an N line display, only N - 2 lines of the buffer are displayed - the top line being the previous command.
Ed 1.11-rc1 uses the same 'N' as ed 0.2, but as 0.2 printed 'N+1' lines, the final result was to print 'display_height - 1' lines.
Maybe ed could set the initial 'N' to 'display_height - 1' lines. OTOH, I like to see the previous command on the top line. It shows that no lines have been scrolled out.
On the other hand, you're in good company: ex(vim) exhibits this (mis)behavior too. And since the command `z' is explicitly omitted from SUSv4, you pretty much have a free hand to define the behavior as you wish.
I am not trying to define anything. 'zN' printing 'N+1' lines was reported as a bug and I agree it is probably a bug.
Martin Guy wrote:
I don't have the source of the original Berkeley ed any more, but the original ex, which extends ed, behaves in the same way as the newly-corrected GNU ed, i.e. z10 prints 10 lines.
Thanks. Good to know that printing N lines is probably the "correct" behaviour.
Best regards, Antonio. _______________________________________________ bug-ed mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-ed
