Scroll diff sides independently

Bug #520417 reported by Martin von Gagern
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QBzr
Won't Fix
Undecided
Unassigned

Bug Description

In some diffs, in particular when many lines are present in only one of the sides, the first few modifications are aligned pretty nicely, but for later changes the lines relating both sides become so slanted as to be almost unusable. This issue is particularly severe when watching a full file diff, or when there are no long blocks of unmodified content.

The easiest solution would be introducing a way to manually scroll one side only. I guess the checkbox should make one side scroll by itself, while the other side would still scroll both. So I'd check that box, and could then scroll in the right window to adjust alingment, and in the left window to scroll both in order to view more of my file.

You might think of fancier solutions. For example, if you scroll down and the middle line visible in the right hand window is a common line that is below the middle of the left window, then it might make sense to only scroll the left window until that common line comes has reached the center. Or you look at topmost or bootommost lines with the same approach. Or you adjust line spacing in some magic way to give good adjustment even when scrolling both sides at the same pace.

I have no clue how any of this would be implemented, and I'd be content with the checkbox solution. But if you can think of a better way and how to implement it, that would be even better.

Revision history for this message
Gary van der Merwe (garyvdm) wrote :

It would be easy to hack your own copy of qbzr to do this. Comment the following lines in lib/diffview.py:
241: self.connect(self.browsers[0].verticalScrollBar(), QtCore.SIGNAL("valueChanged(int)"), self.updateHandle1)
242: self.connect(self.browsers[1].verticalScrollBar(), QtCore.SIGNAL("valueChanged(int)"), self.updateHandle2)

I'm not going to do this though. I do have other ideas on how to improve the hunk alignment / scrolling behaviour.

Changed in qbzr:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.