Fix macOS services no longer able to insert texts in non-Visual modes #1571
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Interactions with OS services that insert texts were improved in #1552 to make it work in a more integrated fashion instead of a hacky injection of 's' followed by the text. However, it only accounted for services that replaces selected texts in visual mode. In other modes, MacVim would simply ignore the service. This was a regression as previously it would work everywhere (albeit often times in a non-intuitive manner since if used in insert mode the user would see an 's' in the beginning). This also affects Shortcuts that a user may have made that could be invoked from the Services menu or bound to a hotkey.
Fix this properly by allowing this to be used in Normal / Insert / Cmdline modes in addition to Visual mode.
Even with this fix, there is still a slight difference between the new behavior and the old hacky solution - the old method would leave the user in Insert mode, whereas the new method would stay in Normal mode. I think this is an improvement so no need to fix.
Fix #1569