Fix scrollbar jumping to the top when no difference in editors
This commit is contained in:
parent
f2ef65afca
commit
572d8de8ef
1 changed files with 1 additions and 1 deletions
|
|
@ -211,7 +211,7 @@ class DiffEditor:
|
||||||
fraction = (y - left_start) / (left_end - left_start)
|
fraction = (y - left_start) / (left_end - left_start)
|
||||||
other_y = round(right_start + fraction * (right_end - right_start))
|
other_y = round(right_start + fraction * (right_end - right_start))
|
||||||
return other_y - 1 if other_y == len(self.editors[1].text_widget) else other_y
|
return other_y - 1 if other_y == len(self.editors[1].text_widget) else other_y
|
||||||
return 0
|
return y
|
||||||
|
|
||||||
def follow_scroll(self):
|
def follow_scroll(self):
|
||||||
x, y = self.editors[0].scroll_position
|
x, y = self.editors[0].scroll_position
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue