Home Download Buy Blog Forum Support

No redraw when using set_timeout?

No redraw when using set_timeout?

Postby aronwoost on Tue Aug 13, 2013 12:49 pm

Code: Select all
import sublime, sublime_plugin

class ExampleCommand(sublime_plugin.TextCommand):
  def run(self, edit):

    self.start = 0
    self.end = 500

    # this works
    # self.set_region()
    sublime.set_timeout(lambda: self.set_region(), 1)

  def set_region(self):
    self.view.sel().add(sublime.Region(self.start, self.end))

When running this command you notice that the region is not correctly drawn to the current view. Any idea?
Posts: 4
Joined: Fri Jul 26, 2013 8:16 pm

Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 6 guests