Author Topic: Find and Replace (big dialog) and cursor vertical position.  (Read 618 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2619
  • Hero Points: 210
  • Text
Find and Replace (big dialog) and cursor vertical position.
« on: September 08, 2020, 01:00:19 am »
I have a file that is several hundred lines long.
With line 206 at the top of the window, and the cursor on line 217.

I F&R from "DARK_1" to "SCHEME_DARK", replace all.

The results: Line 185 at the top and the cursor on line 196.
This is odd - the the cursor is still 11 lines down from the top, but the scroll position doesn't make sense.
The text scrolled up 21 lines for no apparent reason.

This repros easily for me.
Try it with the attached file.



Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6468
  • Hero Points: 504
Re: Find and Replace (big dialog) and cursor vertical position.
« Reply #1 on: September 08, 2020, 08:59:11 pm »
The odd thing to me is that it isn't more predictable where the cursor ends up (the line not the scroll). Not sure what the intent is for sure. I'll investigate this one.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6468
  • Hero Points: 504
Re: Find and Replace (big dialog) and cursor vertical position.
« Reply #2 on: September 08, 2020, 09:33:54 pm »
Good catch. The wrong save/restore cursor position functions were being called.

Fixed for beta 4