GNOME Bugzilla – Bug 739184
Scrolling in central bar should scroll from screen position instead of cursor
Last modified: 2017-12-13 19:09:20 UTC
Currently, if you scroll with the mouse in the central bar on screen, Meld just runs the next-diff/previous-diff action, which goes to the next/previous chunk *relative to the text cursor's position in the textview*. This often feel weird because you use the middle-bar scroll in different scenarios to the cursor-relative next/prev. It would probably be nicer to pick the starting chunk (from which to choose what chunk is next/prev) as whatever chunk is closest to the middle of the screen. This can get slightly weird, since we end up guessing some of the time. However, if we combined this with a heuristic along the lines of "whatever chunk the cursor is in, if that chunk is near the middle of the screen, otherwise whatever chunk is actually in the middle of the screen" then we should be okay. See discussion starting at: https://mail.gnome.org/archives/meld-list/2014-September/msg00001.html
Fixing this might be slightly complicated code, but should be fairly self-contained. I imagine that we'd change FileDiff.next_diff() to take a 'use_viewport' argument, and if that's True we'd determine the chunk to go to as described above. Starting simple would be okay, and we can refine the behaviour as needed from there.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/meld/issues/78.