Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: suppress "no more pattern" messages
If you start at the first occurrence of a search word in a buffer then get to the end and the substitution command repeats from the top there is no more occurrence of the word and so throws an error. Let's try to suppress that error by only doing the second substitution from the fist line to the line above the cursor position if that search word exists. Again, this is a lot of code for such a nicety of not jumping to the top of a file during a search/replace. Time will tell if it's worth it. There remain issues: - the words above the cursor don't highligh with the Substitute highlight group. - they do highlight after you press enter to start substitution, which is also odd - the message after the first substitution is correct, e.g. replaced 3 words on 3 lines, but the second one doesn't occur and makes the first one wrong since you just replaced more words!
- Loading branch information