Author Topic: Scrolling during find next  (Read 3993 times)

Offline schickb

  • Single posting newcomer
  • *
  • Posts: 9
Scrolling during find next
« on: March 31, 2008, 11:31:58 pm »
When I hit the F3 key to "Find Next", CB always scrolls the code window to center the found text. I think a nicer behavior would be to only scroll the window if needed in order to bring the found text into view. Needless scrolling causes a loss of context and can make it harder to follow what is happening. For example, I may already be looking at the next spot where F3 should land when it is only a few lines away. When the window scrolls needlessly my focus point is lost and I have to reset.

Offline DrewBoo

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: Scrolling during find next
« Reply #1 on: April 01, 2008, 12:11:33 am »
When I hit the F3 key to "Find Next", CB always scrolls the code window to center the found text. I think a nicer behavior would be to only scroll the window if needed in order to bring the found text into view. Needless scrolling causes a loss of context and can make it harder to follow what is happening. For example, I may already be looking at the next spot where F3 should land when it is only a few lines away. When the window scrolls needlessly my focus point is lost and I have to reset.

I agree with this.  If tapping F3 merely cycles through a few locations that are within a few lines of each other, it is much less distracting to see just the selection jump around instead of the entire editor view.

Changing this would also more closely match other editors.

Looking at the code that centers this text, I can see that this centering was clearly intentional when it was written.  I wonder why.  (Did it fix a specific problem, or was it arbitrarily chosen?)

(The code in question is SVN:4978 sdk/editormanager.cpp lines 2030 and 2031)