Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
lambda: self.on_change(None) if live_preview else None
)
v.run_command("select_all")
v.settings().set('AlignTabInputPanel', True)
else:
user_input = resolve_input(user_input)
error = []
for uinput in user_input:
# apply align_tab
aligner = Aligner(view, uinput, mode)
self.aligned = aligner.run(edit)
if self.aligned:
if mode:
# to allow keybinds/commands for tablemode
history.insert(uinput)
toggle_table_mode(view, True)
else:
sublime.status_message("")
else:
if mode and not aligner.adjacent_lines_match():
toggle_table_mode(view, False)
else:
error.append(uinput)
if error:
errors = ' '.join(error)
sublime.status_message("[Patterns not Found: " + errors + " ]")
def on_done(self, user_input, mode, live_preview):
history.insert(user_input)
# do not double align when done with live preview mode
if not live_preview:
self.view.run_command("align_tab", {"user_input": user_input, "mode": mode})