How to use the hist.history.reset_index function in hist

To help you get started, we’ve selected a few hist examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github randy3k / AlignTab / aligntab.py View on Github external
def run(self, edit, user_input=None, mode=False, live_preview=False):
        view = self.view
        if not user_input:
            self.aligned = False
            history.reset_index()
            history.roll(backwards=True)
            last = history.get()
            v = self.view.window().show_input_panel(
                'Align By RegEx:', last or "",
                # On Done
                lambda x: self.on_done(x, mode, live_preview),
                # On Change
                lambda x: self.on_change(x) if live_preview else None,
                # On Cancel
                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 = []

hist

Hist classes and utilities

BSD-3-Clause
Latest version published 3 months ago

Package Health Score

84 / 100
Full package analysis

Similar packages