Skip to content
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

:call Vim_Markdown_Preview() changes plugin/applescript/files on Mac OSX #63

Open
nimaai opened this issue May 11, 2017 · 4 comments
Open

Comments

@nimaai
Copy link

nimaai commented May 11, 2017

Hi

:call Vim_Markdown_Preview() modifies plugin/applescript/files on Mac OSX:

  • plugin/applescript/activate-vmp.scpt
  • plugin/applescript/search-for-vmp.scpt

It makes :PluginUpdate to fail for this repository so that I have to git checkout the files to their last version first and rerun :PluginUpdate again.

Greetings,
Matus

@JamshedVesuna
Copy link
Owner

I am unable to reproduce this behavior. Are you using any of this plugin's options? What has the contents of the applescripts changed to?

@nimaai
Copy link
Author

nimaai commented May 12, 2017

Are you using any of this plugin's options?

let vim_markdown_preview_hotkey='<C-m>'
let vim_markdown_preview_browser='Google Chrome'
let vim_markdown_preview_github=1

What has the contents of the applescripts changed to?

# ~/./b/vim-markdown-preview (master) $ git diff
diff --git a/plugin/applescript/activate-vmp.scpt b/plugin/applescript/activate-vmp.scpt
index 511402b..beea2b3 100644
Binary files a/plugin/applescript/activate-vmp.scpt and b/plugin/applescript/activate-vmp.scpt differ
diff --git a/plugin/applescript/search-for-vmp.scpt b/plugin/applescript/search-for-vmp.scpt
index a57dded..5738177 100644
Binary files a/plugin/applescript/search-for-vmp.scpt and b/plugin/applescript/search-for-vmp.scpt differ

They seem to be some kind of binaries; no idea.

@JamshedVesuna
Copy link
Owner

Can you run open plugin/applescript/activate-vmp.scpt and open plugin/applescript/search-for-vmp.scpt to see the changed contents of the applescripts?

@nimaai
Copy link
Author

nimaai commented May 15, 2017

Content of activate-vmp.scpt:

tell application "Google Chrome"
	set windowList to every window
	repeat with aWindow in windowList
		set tabList to every tab of aWindow
		set i to 1
		repeat with atab in tabList
			if (URL of atab contains "vim-markdown-preview.html") then
				tell atab to reload
				set active tab index of first window to i
			end if
			set i to i + 1
		end repeat
	end repeat
end tell

Content of search-for-vmp.scpt:

tell application "Google Chrome"
	repeat with w in windows
		set i to 1
		repeat with t in tabs of w
			if URL of t ends with "vim-markdown-preview.html" then
				return 0
			end if
			set i to i + 1
		end repeat
	end repeat
	return 1
end tell

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

No branches or pull requests

2 participants