[meld/meld-3-16] filediff: Round position to avoid recursive scroll sync (bgo#769705)



commit d34ef315cb895416cd836cca8b874c21f7677552
Author: Vasily Galkin <galkin-vv ya ru>
Date:   Tue Sep 13 19:45:51 2016 +0300

    filediff: Round position to avoid recursive scroll sync (bgo#769705)

 meld/filediff.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index e44049f..c68f48d 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -18,6 +18,7 @@
 
 import copy
 import functools
+import math
 import os
 import time
 
@@ -1715,6 +1716,7 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
                 val += (other_line-int(other_line)) * height
                 val = min(max(val, adj.get_lower()),
                           adj.get_upper() - adj.get_page_size())
+                val = math.floor(val)
                 adj.set_value(val)
 
                 # If we just changed the central bar, make it the master


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]