Fix an exception when chaging diff context on very small diffs
This commit is contained in:
parent
fa01e0b76f
commit
3bddb9d95b
1 changed files with 1 additions and 1 deletions
|
|
@ -208,7 +208,7 @@ def current_position(self, ref):
|
|||
break
|
||||
|
||||
if num is not None:
|
||||
self.scroll_pos = min(num, self.max_scroll_pos)
|
||||
self.scroll_pos = max(0, min(num, self.max_scroll_pos))
|
||||
|
||||
@property
|
||||
def num_lines(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue