Skip to content

Commit

Permalink
Show name of current wiki alongside page name in input panel
Browse files Browse the repository at this point in the history
  • Loading branch information
RheingoldRiver committed Mar 6, 2020
1 parent 802fb1d commit 0c84a41
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mwcommands/mw_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -995,15 +995,16 @@ def get_title(self, title=None):
if not title_pre:
selection = self.window.active_view().sel()
title_pre = self.window.active_view().substr(selection[0]).strip()
self.show_input('Wiki page name:', title_pre)
self.show_input('Wiki page name ({}):'.format(get_view_site()), title_pre)
else:
self.on_done(title)

def on_change(self, title):
if title:
pagename_cleared = pagename_clear(title)
if title != pagename_cleared:
self.window.show_input_panel('Wiki page name:', pagename_cleared, self.on_done, self.on_change, None)
self.window.show_input_panel('Wiki page name ({}):'.format(get_view_site()),
pagename_cleared, self.on_done, self.on_change, None)

def on_done(self, title):
set_timeout_async(self.callback(title), 0)
Expand Down

0 comments on commit 0c84a41

Please sign in to comment.