Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ed: r command addresses #330

Merged
merged 1 commit into from
Nov 21, 2023
Merged

ed: r command addresses #330

merged 1 commit into from
Nov 21, 2023

Conversation

mknos
Copy link
Contributor

@mknos mknos commented Nov 17, 2023

  • edEdit() handles the commands 'e', 'E' and 'r' ($InsertMode indicates 'r')
  • "E filename" and "e filename" replace the entire buffer with the file; specifying an address is invalid
  • "r" pastes a file into the current buffer; "r" can optionally have one or two addresses
  • Two-address "r" just uses the 2nd address, i.e. "1,2r file" is the same as "2r file" (paste file after line 2)
  • The old code that checked $args[1] wasn't correct
  • tidy1: edWrite(): make file mode a parameter to open()
  • tidy2: the same error message typo appeared a few times

* edEdit() handles the commands 'e', 'E' and 'r' ($InsertMode indicates 'r')
* "E filename" and "e filename" replace the entire buffer with the file; specifying an address is invalid
* "r" pastes a file into the current buffer; "r" can optionally have one or two addresses
* Two-address "r" just uses the 2nd address, i.e. "1,2r file" is the same as "2r file" (paste file after line 2)
* The old code that checked $args[1] wasn't correct
* tidy1: edWrite(): make file mode a parameter to open()
* tidy2: the same error message typo appeared a few times
@github-actions github-actions bot added Type: enhancement improve a feature that already exists Priority: low get to this whenever Program: ed The ed program labels Nov 17, 2023
@briandfoy briandfoy self-assigned this Nov 21, 2023
@briandfoy briandfoy merged commit 966a0d2 into briandfoy:master Nov 21, 2023
2 checks passed
@briandfoy briandfoy added Status: accepted The fix is accepted Status: released there is a new release with this fix and removed Priority: low get to this whenever Status: accepted The fix is accepted labels Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Program: ed The ed program Status: released there is a new release with this fix Type: enhancement improve a feature that already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants