scrolling cursor line

24 views
Skip to first unread message

H P

unread,
Jun 24, 2024, 10:36:41 AM (11 days ago) Jun 24
to sem...@googlegroups.com
Sammy,

For some years (2005) I'm using a macro which was written by Ross Boyd;
-------------------------------------------------------------------
Proc ScrollCurs()
    Integer i_WinSize                    = Query(WindowRows)
    Integer i_WindowRowsToPreserveAtTop  = i_WinSize / 2
    Integer i_WindowRowsToPreserveAtFoot = i_WinSize - (i_WindowRowsToPreserveAtTop + 1)
    If i_WindowRowsToPreserveAtFoot + i_WindowRowsToPreserveAtTop < i_WinSize
        Case CurrRow()
            When 1..i_WindowRowsToPreserveAtTop
                ScrollToRow(i_WindowRowsToPreserveAtTop + 1)
            When
                i_WinSize - i_WindowRowsToPreserveAtFoot + 1..i_WinSize
                ScrollToRow(i_WinSize - i_WindowRowsToPreserveAtFoot)
        EndCase
    EndIf
End
Proc Main()
    Hook(_PRE_UPDATE_ALL_WINDOWS_, ScrollCurs)
End  Main
Proc WhenLoaded()
    Main()
End
<WheelUp>       If NOT Up()
                    Alarm()
                EndIf
<WheelDown>     If NOT Down()
                    Alarm()
                EndIf
-------------------------------------------------------------------
This was working perfectly for me under windows up to version 11 pro.
However this macro doesn't work under linux Ubuntu, it even blocks the mousewheel while the CursorUp
and CursorDown are working perfectly.
So I started looking and found the following solution being ScrollToCenter() with which I made the following
macro;
-------------------------------------------------------------------
Proc ScrollCurs()
    ScrollToCenter()
End
Proc Main()
    Hook(_PRE_UPDATE_ALL_WINDOWS_, ScrollCurs)
End  Main
Proc WhenLoaded()
    Main()
End
<WheelUp>       If NOT Up()
                    Alarm()
                EndIf
<WheelDown>     If NOT Down()
                    Alarm()
                EndIf
-------------------------------------------------------------------
But this gave the same result under windows (working perfectly) but also under Ubuntu (NOT).
I'm using the linuxmouse of Carlo which works perfect but without keeping the scroll line in the middle if I don't load the scrollmacro.
Can you steer me in the right direction? Or worse is this a bug?


Met vriendelijke groet,
With kind regards,
Muy atentamente,
Mit Freundliche Gruß,
Sinceramente,


H. Pikaar

Henri...@gmail.com

S.E. Mitchell

unread,
Jun 25, 2024, 6:52:46 AM (11 days ago) Jun 25
to sem...@googlegroups.com
Sorry, I just don't quite understand.
Is this problem only in the Linux version?

Anyone else care to jump in and explain the issue to me?
Thanks!
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/semware/CAAR3jqE1mBbQ%2B9p%2BAwoFvfcuF2gVF_P%3Dhm_RtWVYyRCP2d6MFQ%40mail.gmail.com.

Carlo Hogeveen

unread,
Jun 25, 2024, 7:06:34 AM (11 days ago) Jun 25
to sem...@googlegroups.com

Sammy wrote:
> Sorry, I just don't quite understand.

Me neither.
This is probably a case of first figuring out what the user meant and wants.
I think am a stakeholder because the user refers to my LinuxMouse extension.
I will have a look at it, but not now.

Carlo



H P

unread,
Jun 25, 2024, 7:21:20 AM (11 days ago) Jun 25
to sem...@googlegroups.com
It is working well in both cases under windows, however I tried both cases under linux and it blocks the cursorline from moving with the the mousewheel if under linux the linuxmouse macro is loaded.
The up and down cursor are working fine with the linuxmouse loaded under linux.
Without loading the linuxmouse under linux the mousewheel works fine but clearly doesn't stay in the center,


Met vriendelijke groet,
With kind regards,
Muy atentamente,
Mit Freundliche Gruß,
Sinceramente,


H. Pikaar

Henri...@gmail.com



Op di 25 jun 2024 om 13:06 schreef Carlo Hogeveen <t...@ecarlo.nl>:
--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.

Henriques18

unread,
Jun 25, 2024, 7:25:26 AM (11 days ago) Jun 25
to SemWare TSE Pro text editor
Sorry the last line had to be without loading the scrollcurs macro.

Op dinsdag 25 juni 2024 om 13:21:20 UTC+2 schreef H P:

Carlo Hogeveen

unread,
Jun 27, 2024, 10:56:08 AM (8 days ago) Jun 27
to sem...@googlegroups.com

This is about Linux TSE.

https://ecarlo.nl/tse/InDevelopment.html#LinuxMouse

@Henrique,
This version of LinuxMouse will work with your ScrollCurs macro.

@All,
The new version requires you to explicitly define the <WheelDown> and <WheelUp> keys.
As a benefit it will work better with other Linux TSE macros that use the mouse wheel.

The built-in Windows TSE definitions for these keys seems to be:
<WheelUp> RollUp(Max(GetWheelScrollLines(), 1))
<WheelDown> RollDown(Max(GetWheelScrollLines(), 1))

In Linux TSE GetWheelScrollLines() returns 0, so the above definitions compensate for that and will work in Linux TSE too.

Carlo




H P

unread,
Jun 27, 2024, 1:31:55 PM (8 days ago) Jun 27
to sem...@googlegroups.com
Yep Carlo,

It now works perfectly.


Met vriendelijke groet,
With kind regards,
Muy atentamente,
Mit Freundliche Gruß,
Sinceramente,


H. Pikaar

Henri...@gmail.com



Op do 27 jun 2024 om 16:56 schreef Carlo Hogeveen <t...@ecarlo.nl>:
--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages