Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ed: re-add support for /re/ address-mode (#773)
* 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
- Loading branch information