mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2003
Posts: 18
K
kinnu Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: May 2003
Posts: 18
Doing an /rline causes to window to scroll to currently selected line. The following example creates a window with 1000 lines and updates line 300 once every three seconds. Try scrolling the window by dragging the scrollbar or by mousewheel, and you'll notice how it always jumps back to the currently selected line (line 10 in this case) when the timer runs.
Code:
alias scrolltest {
  window -lar @scroll
  var %i = 1
  while (%i <= 1000) {
    aline @scroll line %i
    inc %i
  }
  sline @scroll 10
  timer 10 3 rline @scroll 300 line replaced
} 


This is very annoying, I have script that continuously updates a window that can have up to 5000 lines, with anything from 0 to 200 updates per minute. Needles to say trying to scroll with a mousewheel/scrollbar is completely useless because this problem. As a workaround you can (pretty much have to at the moment) move in the window with Arrows and PageUp/Down, but it sure would be great if this was fixed.

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
This is the expected behavior of all objects with scrollbars.

How would you have it behave?

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: May 2003
Posts: 18
K
kinnu Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: May 2003
Posts: 18
This is the expected behavior of all objects with scrollbars.

How so? If a line is being replaced by another line, why would the scroll position need to move? Since the total number of lines in the window remains the same, I see no reason for rline to touch the scrollbar in any way.

How would you have it behave?

To NOT scroll. Like if you change that rline to iline there is no jumpiness.

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
its odd but not a bug i guess, some peopel well have by now, expected the focus to change when doing /rline so its unlikely to be altered, and thus has become a "feature" rather than a bug.
The solution as i would assume you have thought of would be to delete the /dline and /iline, nether of them set the focus from memory. (go on someone tell me im wrong!)

Joined: May 2003
Posts: 18
K
kinnu Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: May 2003
Posts: 18
> its odd but not a bug i guess, some peopel well have by now, expected the focus to change when doing /rline so its unlikely to be altered, and thus has become a "feature" rather than a bug.

In that case a new switch for /rline could be introduced. /rline -b to NOT reset focus (mnemonic: -b for scrollbar). Or the other way around, make the not reseting the default and force old behaviour with -b switch. I'd be perfectly happy with a switch, just need _some_ way to do it. Also I think aline/iline/rline/etc should work in a consistent manner, make them ALL reset the focus by default and make them all accept the new option.

As for dline+iline combo.. dline unfortunately does the same focus reset as rline does.


Link Copied to Clipboard