def print_to_panel_mainthread(self,cmd,str_a):
win = sublime.active_window()
strtxt = u"".join(str(line) for line in str_a)
if(len(str_a)):
v = win.create_output_panel('hg_out')
if cmd=="diff" :
v.set_syntax_file('Packages/Diff/Diff.tmLanguage')
v.settings().set('word_wrap', self.view.settings().get('word_wrap'))
edit = v.begin_edit(None,None) ##### ISSUE HERE #####
v.insert(edit, 0, strtxt)
v.end_edit(edit)
win.run_command("show_panel", {"panel": "output.hg_out"})
Clams wrote:but slightly more comment (as just a bit more than none )
class AlignTabCommand(sublime_plugin.TextCommand):
def run(self, edit, user_input=None):
self.edit = edit
print("Called with params " + str(user_input))
if not user_input:
v = self.view.window().show_input_panel('Align with regex:', '',
self.align_tab, None, None)
# print os.getcwd()
v.set_syntax_file('Packages/AlignTab/AlignTab.tmLanguage')
v.settings().set('gutter', False)
v.settings().set('rulers', [])
else:
self.align_tab(user_input)Clams wrote:Ok I understand nowSo the way I handle it is fine I guess .
Users browsing this forum: No registered users and 2 guests