Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ed: buffer is dirty unless all lines were written (#932)
* I found a case where ed allowed unsaved changes to be lost * The default behaviour of "w" command is to write all lines from the editor buffer * In the case of 1w or 1,2w command, only the selected lines are written and there may be unsaved changes on other lines, so don't unset the "dirty" flag * The flag should be unmodified also in the case of "w !cat", where all buffer lines are written to a pipe * This patch makes ed consistent with BSD and GNU versions
- Loading branch information