Skip to content

Commit

Permalink
fix: Improve Get Info popup
Browse files Browse the repository at this point in the history
  • Loading branch information
equinusocio committed Dec 5, 2016
1 parent 00785ae commit 1a1f297
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions utils/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,10 @@ def run(self):
""" % info
)

sublime.message_dialog(msg + '\nInfo has been copied to the clipboard.')
sublime.set_clipboard(msg)
view = sublime.active_window().active_view()

def copy_and_hide(msg):
sublime.set_clipboard(msg)
view.hide_popup()

view.show_popup(msg.replace('\n', '<br>') + '<br><a href="' + msg + '">Copy</a>', on_navigate = copy_and_hide, max_height = 340)

0 comments on commit 1a1f297

Please sign in to comment.