Author Topic: mouse wheel scroll should scrol buffer as is (not from location of cursor)  (Read 352 times)

jcelle

  • Senior Community Member
  • Posts: 232
  • Hero Points: 5
Hello there,
This is something I find really annoying since early versions of SE and I am wondering if this could be managed one way or another.
Steps:
- open a file, big enough to not be visible without scrolling
- scroll to the end of the file and place your cursor here
- use the mouse and scrollbar to scroll up so that the cursor is no longer visible
- here is the interesting part: place your mouse over the buffer and use the wheel to continue your action of scrolling up
Expected : the buffer continues to scroll up
Seen: the buffer is scrolled back to the part of the file where the cursor is located and then scroll starts from there.

It is very destabilizing...
So could there be a way to tune this ?
Thanks.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6398
  • Hero Points: 498
Re: mouse wheel scroll should scrol buffer as is (not from location of cursor)
« Reply #1 on: September 20, 2022, 01:31:27 pm »
I can't reproduce this. For me, using the wheel to continue to scroll up does exactly that, it continues to scroll up. It does not start from the cursor position. There must be some extra magic needed for this to happen (config,mouse,mouse driver???).

Try a default config:
Code: [Select]
vs +new -sc c:\temp\new-config-dir

jcelle

  • Senior Community Member
  • Posts: 232
  • Hero Points: 5
Re: mouse wheel scroll should scrol buffer as is (not from location of cursor)
« Reply #2 on: September 20, 2022, 02:42:22 pm »
Damned you are right, it works as I wish it would work !
Any idea of some setting that could alter this ?
I am thinking of any option to make the cursor remain visible while you scroll : it is how it behave if I scroll only with the wheel or with the keyboard.
« Last Edit: September 20, 2022, 02:44:02 pm by jcelle »

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6398
  • Hero Points: 498
Re: mouse wheel scroll should scrol buffer as is (not from location of cursor)
« Reply #3 on: September 20, 2022, 03:08:11 pm »
I don't know of a setting for SlickEdit to keep the cursor visible when scrolling but SlickEdit has so many options that I could be wrong  ;D

jcelle

  • Senior Community Member
  • Posts: 232
  • Hero Points: 5
Re: mouse wheel scroll should scrol buffer as is (not from location of cursor)
« Reply #4 on: September 20, 2022, 03:35:06 pm »
It does because the cursor vanishes upon scroll (with a brand new config as you suggested) and remains on first or last visible line with my config.
I am quite sure this is related.
Point is I can't either find this option back...
« Last Edit: September 20, 2022, 03:44:01 pm by jcelle »

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6398
  • Hero Points: 498
Re: mouse wheel scroll should scrol buffer as is (not from location of cursor)
« Reply #5 on: September 20, 2022, 03:58:30 pm »
Please post your user.cfg.xml

jcelle

  • Senior Community Member
  • Posts: 232
  • Hero Points: 5
Re: mouse wheel scroll should scrol buffer as is (not from location of cursor)
« Reply #6 on: September 20, 2022, 04:28:32 pm »
Here it is.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6398
  • Hero Points: 498
Re: mouse wheel scroll should scrol buffer as is (not from location of cursor)
« Reply #7 on: September 20, 2022, 04:49:16 pm »
I've fixed your config. You changed your bindings for WHEEL-UP and WHEEL-DOWN to scroll-up and scroll-down which are intended to bound to keys and keep the cursor in view.

jcelle

  • Senior Community Member
  • Posts: 232
  • Hero Points: 5
Re: mouse wheel scroll should scrol buffer as is (not from location of cursor)
« Reply #8 on: September 20, 2022, 05:11:24 pm »
Ah I would have never remembered...
Thanks so much for having investigated this.
Though it introduces a dual problem : now if I scroll with the wheel, the cursor vanishes, and if I press any key the whole buffer is scrolled back to where the cursor is. This is I think why I had remapped the wheel-up and wheel-down keys: I want the cursor to remain in view so that I can continue editing.
In both cases I have to click to put back the cursor in view : it would make sense to add an option to keep the cursor visible, whatever scrolling function you use.
I'll see meanwhile what extra click is the most acceptable for me.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3725
  • Hero Points: 490
Re: mouse wheel scroll should scrol buffer as is (not from location of cursor)
« Reply #9 on: September 20, 2022, 05:42:53 pm »
You could map Ctrl+Alt+WheelUp/Down to page-up/down (or scroll-up/down) so that you would have a way to scroll keeping the cursor in view when you want to.

jcelle

  • Senior Community Member
  • Posts: 232
  • Hero Points: 5
Re: mouse wheel scroll should scrol buffer as is (not from location of cursor)
« Reply #10 on: September 20, 2022, 07:00:40 pm »
well, I think I always need to have the cursor remaining in view.
All scrolling mechanisms must be consistent.
I have set back wheelXXX to scroll-XXX and now I understand better my original problem: using the scrollbar is the only scrolling function that does not (yet?) keep the cursor in view.
Do you think there could be a way to change this ?
Could a macro listen to some scrolling event and move back the cursor in view ?
Interesting problem...

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3725
  • Hero Points: 490
Re: mouse wheel scroll should scrol buffer as is (not from location of cursor)
« Reply #11 on: September 20, 2022, 08:19:21 pm »
If the document overview bar is visible, a quick double-click there will move the cursor to that scroll location (single-click will jump to any highlight, double-click will jump to any location on the document overview bar).

Graeme

  • Senior Community Member
  • Posts: 2745
  • Hero Points: 340
Re: mouse wheel scroll should scrol buffer as is (not from location of cursor)
« Reply #12 on: September 20, 2022, 10:59:42 pm »
I haven't read this thread properly so not sure what you're asking for but I recall writing this macro when you asked about it a few years ago
https://community.slickedit.com/index.php/topic,16973.msg65681.html#msg65681

It comes with xretrace/ xxutils but it looks like I haven't documented it properly - I'll add to my todo list
https://community.slickedit.com/index.php/topic,18320.0.html


jcelle

  • Senior Community Member
  • Posts: 232
  • Hero Points: 5
Re: mouse wheel scroll should scrol buffer as is (not from location of cursor)
« Reply #13 on: September 21, 2022, 05:54:11 am »
Gee you are smart Graeme ! I had totally forgotten about this post I did (https://community.slickedit.com/index.php/topic,16659.0.html). Now I remember I had to give up as I was using Slickedit standard at that time and could not load macro files.
I am now using PRO and I could load your file (picked the latest in https://community.slickedit.com/index.php/topic,16973.msg65681.html#msg65681) and bind wheelxx keys to xscrollxx functions.
Using wheelxx scrolls the buffer as long as the cursor is visible: once the cursor goes out of view the buffer no longer scrolls.
Same behavior with CTRL key.
Scroll works with SHIFT, though cursor goes out of view.
Note I don't know anything about xtrace: do I need to load another file ?


« Last Edit: September 21, 2022, 06:30:11 am by jcelle »

Graeme

  • Senior Community Member
  • Posts: 2745
  • Hero Points: 340
Re: mouse wheel scroll should scrol buffer as is (not from location of cursor)
« Reply #14 on: September 21, 2022, 09:47:02 am »
You probably need to run the command xretrace_toggle_xscroll to swap the key bindings between the new ones and the normal ones.  It sets or clears the variable xretrace_def_scroll_up_with_cursor which is probably why it's not working for you.  You need to use this command to swap back to the normal key bindings before you use the diff tool, otherwise diff reports an error.