Skip to content

Fix macOS services no longer able to insert texts in non-Visual modes #1571

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

Merged
merged 1 commit into from
Mar 28, 2025

Conversation

ychin
Copy link
Member

@ychin ychin commented Mar 28, 2025

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

Interactions with OS services that insert texts were improved in macvim-dev#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 macvim-dev#1569
@ychin ychin force-pushed the fix-shortcut-services-text-input branch from ebb9518 to 7cb3ab5 Compare March 28, 2025 07:00
@ychin ychin merged commit 08f49ae into macvim-dev:master Mar 28, 2025
5 checks passed
@ychin ychin deleted the fix-shortcut-services-text-input branch March 28, 2025 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

r181 Ctrl key mappings no longer work like they did on r180 (r180 fresh install on new MBP)
1 participant