Author Topic: PgDown broken  (Read 99 times)

jcelle

  • Senior Community Member
  • Posts: 198
  • Hero Points: 5
PgDown broken
« on: August 04, 2022, 04:49:47 pm »
Hello,
Using PgDown on a PHP file I see that sometimes the buffer is scrolled only one line down.
I know that there are some features about PgDown in this beta : is it supposed to change the default behavior of PgDown ?
If yes how can I have PgDown just scroll down one page ?
If no I'll post more details.
Thanks.

Note: same for PgUp. When PgDown scrolls onely one line down, an immediate PgUp scrolls back up only one line.
« Last Edit: August 04, 2022, 04:59:08 pm by jcelle »

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3647
  • Hero Points: 483
Re: PgDown broken
« Reply #1 on: August 04, 2022, 06:28:26 pm »
What you are seeing is the new Smart Page feature, which makes PgUp and PgDown look for intelligent landings so that it is easier to orient yourself in the code after paging than it is when using the normal paging by full screens.  You can learn more about it by looking at the new features readme.

You can turn it off by going to Tools > Options... > Editing > Cursor Movement > Cursor page up/down > Full Page.

I would like to see the test case (actual file) where it moved only one line.  What line did you start on and how many lines were visible in the editor window at the time?  Smart Page moving only one line should not happen, unless the editor window is very small.  But, it is always possible that you found a corner case.

jcelle

  • Senior Community Member
  • Posts: 198
  • Hero Points: 5
Re: PgDown broken
« Reply #2 on: August 04, 2022, 07:35:38 pm »
Thanks Dennis for the explanation. I found the settings and could revert to normal behavior.
I am attaching a PHP screenshot showing a one line scroll.
Looks like related to the cursor being on a '// comment" line.
Cheers.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3647
  • Hero Points: 483
Re: PgDown broken
« Reply #3 on: August 04, 2022, 08:58:15 pm »
I will look over the Smart Page code, but I probably will not be able to reproduce it based on that screen shot, because I can't see what the code was that it decided not to page down to.  Any chance you can PM me just the five surrounding functions (actual code)?  You can obfuscate the identifiers if it matters.

jcelle

  • Senior Community Member
  • Posts: 198
  • Hero Points: 5
Re: PgDown broken
« Reply #4 on: August 05, 2022, 05:28:25 am »
In fact I managed to create a use case you could re-use if you can reproduce with your configuration.
- open page-down.php attached file : your cursor should be on line 1
- pg-down : line 4 (a comment line preceding a function)
- pg-down: line 5 (the function name ) !!!
- next pg-down navigate normally in lorem-ipsum text

Hope it helps.