Scroll diff sides independently
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.
It would be easy to hack your own copy of qbzr to do this. Comment the following lines in lib/diffview.py: self.browsers[ 0].verticalScro llBar() , QtCore. SIGNAL( "valueChanged( int)"), self.updateHandle1) self.browsers[ 1].verticalScro llBar() , QtCore. SIGNAL( "valueChanged( int)"), self.updateHandle2)
241: self.connect(
242: self.connect(
I'm not going to do this though. I do have other ideas on how to improve the hunk alignment / scrolling behaviour.