Using ed 1.13 The POSIX standard for the Insert command states:
the current line is set to the last inserted line or, if there was none, to the addressed line This goes against all implementations of ed that I can find, which set the current line to be the inserted line, or, if no input was provided, at a line before the addressed line. That is, if I'm on the first line and type: i . then the current line is now 0, even though the addressed line was 1. This is documented vaguely in GNU ed, as it doesn't address the "no lines entered" edge case: "The current address is set to the last line entered" It's clearer in the Plan 9 docs: "Dot is left at the last line input, or, if there were none, at the line before the addressed line." If the above is correct: * Should this be listed as a deviation from POSIX? * Could the docs be improved to specifically mention the behavior with empty input? The documentation for Append has a similar issue. _______________________________________________ bug-ed mailing list bug-ed@gnu.org https://lists.gnu.org/mailman/listinfo/bug-ed