bug-ed
[Top][All Lists]
Advanced

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

Re: [Bug-ed] GNU ed 1.14-pre1 released


From: Ori Avtalion
Subject: Re: [Bug-ed] GNU ed 1.14-pre1 released
Date: Wed, 20 Apr 2016 20:12:24 +0300

An empty insert command with address 0 still seems to set the current
address to 0.

:0i
.

According to the POSIX spec, it should be interpreted as 1:
  "the current line is set to the last inserted line or, if there was
none, to the addressed line.
   [..]
  Address 0 shall be valid for this command; it shall be interpreted
as if address 1 were specified."


Append to a 0 address exhibits the same behavior, but the spec is
unclear as to where the current address should be, as it doesn't
specifically say to interpret it as "address 1":
  "Address 0 shall be valid for this command; it shall cause the
appended text to be placed at the beginning of the buffer."

However, I think the spirit of the text does suggest that the current
address should be 1. :)



reply via email to

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