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: re-add support for /re/ address-mode #773

Merged
merged 1 commit into from
Oct 29, 2024

Commits on Oct 29, 2024

  1. ed: re-add support for /re/ address-mode

    * Standard ed allows a regex to be placed in front of a command
    * Previously CalculateLine() supported this but the function was replaced by getAddr()
    * Add a new condition in getAddr() to allow resolving /re/ command prefix to a line number
    * Be careful to support repeated search for empty pattern
    * test1: /include/n  ---> search for /include/, resolve line number and run n command
    * test2: //l ---> repeat search using saved /include/ pattern, then run l command on next-match
    * test3: /return/  ---> no command given with pattern still works
    * test4: /a\/b/p --> search pattern includes escaped slash; run p command on result
    mknos authored Oct 29, 2024
    Configuration menu
    Copy the full SHA
    e03b37d View commit details
    Browse the repository at this point in the history