Fix an exception when chaging diff context on very small diffs
This commit is contained in:
parent
fa01e0b76f
commit
3bddb9d95b
@ -208,7 +208,7 @@ class DiffHandler(Handler):
|
|||||||
break
|
break
|
||||||
|
|
||||||
if num is not None:
|
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
|
@property
|
||||||
def num_lines(self):
|
def num_lines(self):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user