

def QueueLinter(self, view):
    if self.linterRunning:
        return
    self.linterQueue += 1
    settings = SublimePapyrus.GetSettings()
    delay = 0.5
    if settings:
        delay = (settings.get('linter_delay', 500) / 1000.0)
        if (delay < 0.05):
            delay = 0.05
    self.bufferID = view.buffer_id()
    if self.bufferID:
        (lineNumber, columnNumber) = view.rowcol(view.sel()[0].begin())
        lineNumber += 1
        if (PYTHON_VERSION[0] == 2):
            self.scriptContents = view.substr(sublime.Region(0, view.size()))
            self.sourcePaths = SublimePapyrus.GetSourcePaths(view)
            SublimePapyrus.ClearLinterHighlights(view)
            t = threading.Timer(delay, self.Linter, kwargs={
                'view': None,
                'lineNumber': lineNumber,
            })
            t.daemon = True
            t.start()
        elif (PYTHON_VERSION[0] >= 3):
            t = threading.Timer(delay, self.Linter, kwargs={
                'view': view,
                'lineNumber': lineNumber,
            })
            t.daemon = True
            t.start()

dataset/ETHPy150Open Kapiainen/SublimePapyrus/Source/Modules/Skyrim/Plugin.py EventListener.QueueLinter/original