Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ed: edInsert() mostly duplicate code (#466)
* edInsert() handles Append "a" command and Insert "i" command * The special case for address 0 can be removed; the code with tmp_lines2 is general enough to handle this, i.e. for address 0, tmp_lines will be added at start of buffer and tmp_lines2 will be empty * In insert mode the target address is the addressed line; decrement is needed for conversion to correct array index * test1: "0a", "0i" and "1i" --> add input to start of buffer * test2: "1a" and "2i" --> add input after buffer line 1, and at buffer line 2 (equivalent)
- Loading branch information