Exemplo n.º 1
0
def cmd_share(view, edit, args, wd, rkey):
	av = gs.active_valid_go_view(win=view.window())
	if av is None:
		push_output(view, rkey, 'not sharing non-go src')
		return

	def f(res, err):
		s = '%s\n%s' % (err, res.get('url', ''))
		push_output(view, rkey, s.strip())

	mg9.share(gs.view_src(view.window().active_view()), f)
Exemplo n.º 2
0
def cmd_share(view, edit, args, wd, rkey):
    av = gs.active_valid_go_view(win=view.window())
    if av is None:
        push_output(view, rkey, 'not sharing non-go src')
        return

    def f(res, err):
        s = '%s\n%s' % (err, res.get('url', ''))
        push_output(view, rkey, s.strip())

    mg9.share(gs.view_src(view.window().active_view()), f)