Skip to content

Fix macvim-askpass to send event to MacVim itself instead of Finder #1093

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
Sep 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/MacVim/macvim-askpass
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
#
# An SSH_ASKPASS command for MacOS X
#
# Author: Joseph Mocker, Sun Microsystems
# Original script from:
# http://blog.retep.org/2009/04/09/ssh-askpass-on-osx-10-5/
# Author: Joseph Mocker, Sun Microsystems
#
# http://blog.retep.org/2009/04/09/ssh-askpass-on-osx-10-5/

#
# To use this script:
Expand All @@ -18,8 +19,7 @@ TITLE=${MACOS_ASKPASS_TITLE:-"SSH"}
DIALOG="display dialog \"$@\" default answer \"\" with title \"$TITLE\""
DIALOG="$DIALOG with icon caution with hidden answer"

result=`osascript -e 'tell application "Finder"' -e "activate" -e "$DIALOG" -e "text returned of result" -e 'end tell'`
osascript -e 'tell application "MacVim"' -e "activate" -e 'end tell'
result=`osascript -e 'tell application "MacVim"' -e "activate" -e "$DIALOG" -e "text returned of result" -e 'end tell'`

if [ "$result" = "" ]; then
exit 1
Expand Down