Skip to content

Commit

Permalink
Removed redundant rendering from move_cursors().
Browse files Browse the repository at this point in the history
  • Loading branch information
richrd committed Mar 11, 2016
1 parent 75681ef commit 7a13894
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions suplemon/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,6 @@ def move_y_scroll(self, delta):

def move_cursors(self, delta=None):
"""Move all cursors with delta. To avoid refreshing the screen set noupdate to True."""
if self.app.block_rendering:
noupdate = True

for cursor in self.cursors:
if delta:
if delta[0] != 0 and cursor.x >= 0:
Expand Down Expand Up @@ -582,7 +579,7 @@ def remove_cursor(self, cursor):
self.cursors.pop(index)
return True

def purge_cursors(self, render=True):
def purge_cursors(self):
"""Remove duplicate cursors that have the same position."""
new = []
# This sucks: can't use "if .. in .." for different instances (?)
Expand All @@ -593,8 +590,6 @@ def purge_cursors(self, render=True):
ref.append(cursor.tuple())
new.append(cursor)
self.cursors = new
if render:
self.render() # TODO: is this needed?

def purge_line_cursors(self, line_no):
"""Remove all but first cursor on given line."""
Expand Down

0 comments on commit 7a13894

Please sign in to comment.