Skip to content

MacVim deletes searcch string of other apps even with MMShareFindPboard set to false #773

Closed

Description

@chdiza

I have MMShareFindPboard set to false so that MacVim's search string doesn't interfere with that of other Cocoa apps. (There's nothing worse than e.g., hitting Cmd-F in Safari only to find the little search box pre-populated with something like \(foo\|bar\)\+.)

I've noticed however that MacVim will clear another app's search string.

Reproduce: Open Safari, go to some webpage, and search (Cmd-F) for some string that is present on the page. Maybe hit Cmd-G to go to the next instance. Do not close the "find bar" in Safari. Then Cmd-Tab to an open MacVim document (or just open one afresh) and hit /; enter a search string and hit . Then Cmd-Tab back to Safari and observe that, while the find bar is still open and occurrences of your search string are still highlighted, your search string is gone, and Cmd-G no longer works because it doesn't know what string it should be looking for the next occurrence of.

Activity

  1. eirnym commented on Nov 8, 2018

    @eirnym
    Contributor

    additionally, with some plugins like better-whitespace, Safari's search string will be last search to clear whitespaces.

  2. ychin commented on Nov 9, 2018

    @ychin
    Member

    Can confirm this happens. Will look into it.

  3. added a commit that references this issue on Nov 19, 2018
    3df190c
  4. ychin commented on Nov 19, 2018

    @ychin
    Member

    Just opened a pull request (#780) to fix this. Will merge that in shortly. I have decided to make Cmd-E and Cmd-G in MacVim still respect the system pasteboard even with MMShareFindPboard set to NO because it's an explicit MacVim command and it's a little more consistent with how other macOS apps behave. You can use normal Vim commands like n and / and they won't pollute the system find pasteboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions