Skip to content

Fix MMShareFindPboard and Cmd-E/Cmd-G #780

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 2 commits into from
Nov 20, 2018

Conversation

ychin
Copy link
Member

@ychin ychin commented Nov 19, 2018

Fix MMShareFindPboard not working properly. MMShareFindPboard is supposed to prevent MacVim from updating the system find pasteboard when searching, but the previous behavior was that it would only set the Vim-specific format to the find pasteboard so you could still share search patterns across Vim windows but it has the effect of clearing the global find pasteboard. Just fix that by making MacVim not touch the system find pasteboard at all when MMShareFindPboard is set to NO to respect user's setting.

Also, make Cmd-E/Cmd-G always use the OS find pasteboard even if MMShareFindPboard is set to NO. This keeps the behavior consistent with how other macOS apps work and a way for the user to still access it even with the setting off. One can always still use n or other normal Vim search commands to search without using the system find pasteboard.

Also update docs to make this clear, and rename all "OS X" to "macOS" to keep up with the times.

Close #773

Edit: This also Close #752

MMShareFindPboard is supposed to prevent MacVim from updating the system
find pasteboard when searching, but the previous behavior was that it
would only set the Vim-specific format to the find pasteboard so you
could still share search patterns across Vim windows but it has the
effect of clearing the global find pasteboard. Just fix that by making
MacVim not touch the system find pasteboard at all when
MMShareFindPboard is set to NO to respect user's wish. Cmd-G will still
use the system find pasteboard to make it easy to search in another
macOS program and jump to Vim. The user can always use `n` instead if
that's not desired.

Also update docs to make this clear, and rename all "OS X" to "macOS" to
keep up with the times.

Close macvim-dev#773
Cmd-E (Edit -> Use Selection for Find") in most macOS apps follow the
convention that it shares to the system Find Pasteboard, while Cmd-G
uses the Find Pasteboard to find the next item. Make Cmd-E always do
that even if MMShareFindPboard is set to NO. This way, normal searches
in Vim wouldn't pollute the system find pasteboard, but could still have
a way to share to it by using this action.
@chdiza
Copy link
Contributor

chdiza commented Nov 19, 2018

I've just built using this PR and it appears to work as advertised. I'll keep playing with it.

As an added bonus, it appears to have fixed bug #752!

@ychin
Copy link
Member Author

ychin commented Nov 20, 2018

@chdiza That's good to know! I didn't realize this would fix that bug but it makes sense looking at the code, as previously it was registering the string clipboard but not providing content for it, so maybe it led to some bad interactions across the difference programs.

@ychin ychin merged commit ea5fe03 into macvim-dev:master Nov 20, 2018
@ychin ychin deleted the find-pasteboard-fixes branch November 20, 2018 05:19
ychin added a commit to ychin/macvim that referenced this pull request Dec 5, 2018
Vim patch 8.1.560

Targets macOS 10.8+

Features:
- macOS Mojave (10.14) is now supported.
    - MacVim's UI now works with Dark Mode.
    - Fixed broken rendering and flickering under Mojave when using the
      default Core Text renderer. macvim-dev#757
- guioption 'k' is supported again. macvim-dev#731
    - This option prevents window from resizing when UI elements such as
      toolbars or tabs show or hide themselves.

Fixes:
- Fixed misc fullscreen and window resizing bugs and artifacts macvim-dev#745
- Dragging tabs to reorder now works properly macvim-dev#789
- Fixed timer callback handling in GUI macvim-dev#749
- Fixed native tabs (10.12+) interring with Vim tabs macvim-dev#788
- Fixed Japanese IME Ctrl-U/Ctrl-O handling macvim-dev#742
- Fixed MMShareFindPboard and Cmd-E/Cmd-G interactions macvim-dev#780
- Better handling of guifontwide font size macvim-dev#737
- Better python discovery in default vimrc macvim-dev#739

Known Issues:
- Scrolling performance is slightly worse under Mojave macvim-dev#796

Script interfaces have compatibility with these versions:
- Lua 5.3
- Perl 5.18
- Python2 2.7
- Python3 3.7
- Ruby 2.5
ychin added a commit that referenced this pull request Dec 5, 2018
Vim patch 8.1.560

Targets macOS 10.8+

Features:
- macOS Mojave (10.14) is now supported.
    - MacVim's UI now works with Dark Mode.
    - Fixed broken rendering and flickering under Mojave when using the
      default Core Text renderer. #757
- guioption 'k' is supported again. #731
    - This option prevents window from resizing when UI elements such as
      toolbars or tabs show or hide themselves.

Fixes:
- Fixed misc fullscreen and window resizing bugs and artifacts #745
- Dragging tabs to reorder now works properly #789
- Fixed timer callback handling in GUI #749
- Fixed native tabs (10.12+) interring with Vim tabs #788
- Fixed Japanese IME Ctrl-U/Ctrl-O handling #742
- Fixed MMShareFindPboard and Cmd-E/Cmd-G interactions #780
- Better handling of guifontwide font size #737
- Better python discovery in default vimrc #739

Known Issues:
- Scrolling performance is slightly worse under Mojave #796

Script interfaces have compatibility with these versions:
- Lua 5.3
- Perl 5.18
- Python2 2.7
- Python3 3.7
- Ruby 2.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants