Author Topic: Copy Code Block and scrolling  (Read 214 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2512
  • Hero Points: 206
  • Text
Copy Code Block and scrolling
« on: May 20, 2022, 12:47:26 am »
When slick brings up "Copy Code Block" it makes some attempt to scroll the entire block into view -- but it seems to be getting the math wrong in some cases.

Given the attached file, and on my screen I see 56 lines of text.

#1
1. With line 1 at the top of the display and the <Controls> block is 42 lines long.
2. Press Ctrl+C on line 41: <Controls>
3. Slick scrolls so the top line is 28 of the file and "</Controls>" is visible.
    Seems pretty nice.
4. Add an extra blank line to make the <Controls> block be 43 lines and now on Ctrl+C Slickedit will not attempt to scroll the block into view.
Why not? There is plenty of room to do so.


#2
1. Same as above. The <Controls> block is 42 lines long.
2. Make line 32 of the line be the top line displayed.
3. Press Ctrl+C on line 41
4. CopyCodeBlock appears -- seems OK.
5. Add one blank line to make <Controls> be 43 lines long.
6. Press Ctrl+C on line 41
7. CopyCodeBlock appears -- but this time slick edit scrolls to make line 1 be the top line of the display, hiding most of the <Controls> block.


The math seems to be sensitive to the size of the file, the size of the block and other factors I have not chased down.

Slick should scroll the entire block into view when possible.
Slick shouldn't scroll an entirely visible block down to hide part of it.


Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3618
  • Hero Points: 481
Re: Copy Code Block and scrolling
« Reply #1 on: May 20, 2022, 03:46:15 pm »
I'll add this to my list of things to look into.  Thanks for the thorough examples.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3618
  • Hero Points: 481
Re: Copy Code Block and scrolling
« Reply #2 on: May 20, 2022, 08:36:02 pm »
Fixed for next hot fix.