gdb-gui icon indicating copy to clipboard operation
gdb-gui copied to clipboard

make scrolling more intelligent

Open tromey opened this issue 10 years ago • 2 comments

Right now the source window scrolls naively. It would be great if it were more intelligent.

The ideal would be if we could get loop information out of gdb, so we could scroll the window to show the entirety of a loop. This isn't available though.

When entering a new function we should try to display it -- centering the function in the window if it is small enough, but otherwise showing the start of the function at the top.

When stepping we could adopt a somewhat emacs-like approach. After N steps that scroll a single line, we could scroll so that point is centered. Then if we have to scroll backward within a function, assume there is a loop and scroll so that point is at the top of the window (to try to keep the entire loop visible).

tromey avatar Apr 29 '15 13:04 tromey

Another case to consider is up/down. Here "same frame" isn't the relevant distinction but instead the window should save scroll positions with the buffer, or something like that.

tromey avatar May 17 '15 15:05 tromey

Now I'm thinking of having two margins: an "outer" margin, where if stepping moves past that point, the text is scrolled; and an "inner" margin which indicates how much more text to show.

tromey avatar Nov 10 '16 19:11 tromey