Skip to content

Commit

Permalink
Work around fixing issue #1
Browse files Browse the repository at this point in the history
  • Loading branch information
quarnster committed Apr 1, 2012
1 parent 178e638 commit 86bb7c9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions sublimegdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,13 @@ def do_scroll(self, data):
self.view.run_command("goto_line", {"line": data + 1})

def do_set_viewport_position(self, data):
self.view.set_viewport_position(data, True)
# Shouldn't have to call viewport_extent, but it
# seems to flush whatever value is stale so that
# the following set_viewport_position works.
# Keeping it around as a WAR until it's fixed
# in Sublime Text 2.
self.view.viewport_extent()
self.view.set_viewport_position(data, False)

def update(self):
if not self.is_open():
Expand Down Expand Up @@ -582,8 +588,6 @@ def expand_collapse_variable(self, view, expand=True, toggle=False):
var.collapse()
pos = view.viewport_position()
self.update_view()
self.update()
self.scroll(row)
self.set_viewport_position(pos)
self.update()

Expand Down

0 comments on commit 86bb7c9

Please sign in to comment.