Old cursor bug?

12 views
Skip to first unread message

Carlo Hogeveen

unread,
Oct 23, 2025, 11:09:07 AM (14 days ago) Oct 23
to Semware @ GoogleGroups

While displaying my magnificent new box cursor I want to turn TSE's cursor off.
Surprisingly, as the macro below demonstrates, the setting that is supposed to do that, is unturnoffable, and apparently has always
been.
My work-around is to set InsertCursorSize and OverwriteCursorSize to 0.

Carlo


proc idle()
Unhook(idle)
Warn('The cursor is'; iif(Query(Cursor), 'ON', 'OFF'))
end idle

proc main()
Set(Cursor, OFF)
Hook(_idle_, idle)
end main



S.E. Mitchell

unread,
Oct 23, 2025, 7:46:56 PM (14 days ago) Oct 23
to sem...@googlegroups.com
Not sure what bug you are reporting.
If it is set(Cursor, Off), then I can't repeat that here.
> --
>
> ---
> 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 visit https://groups.google.com/d/msgid/semware/000101dc442e%24f695d070%24e3c17150%24%40ecarlo.nl.

Carlo Hogeveen

unread,
Oct 24, 2025, 3:57:56 AM (13 days ago) Oct 24
to sem...@googlegroups.com

> Not sure what bug you are reporting.
> If it is set(Cursor, Off), then I can't repeat that here.

The terminology was confusing me.
I am trying to turn off what I called the text cursor.
Reading up on Windows APIs, Windows calls my "mouse pointer" a "cursor" and my "text cursor" a "caret".
Now I have two issues, both of which are demonstrated by the new demo macro below.

1.
Whatever TSE's internal variable "Cursor" is supposed to stand for, setting it off does not work persistently.
As the demo macro shows, when doing a Set(Cursor, OFF), it automatically turns it ON again after the macro stops running, as show by the Warn(Query(Cursor)) during the next _idle_ time.

2.
As the demo macro shows, even when I tell a Windows API directly to turn the caret OFF, it either does not work or TSE turns it ON again.

Help?
Carlo



dll "<user32.dll>"
integer proc HideCaret(integer hWnd)
integer proc ShowCaret(integer hWnd)
end

proc idle()
UnHook(idle)
Warn('2nd Query(Cursor) in idle ='; iif(Query(Cursor), 'ON', 'OFF'))
PurgeMacro(CurrMacroFilename())
end idle

proc Main()
case MsgBoxEx(SplitPath(CurrMacroFilename(), _NAME_),
'Test TSE "cursor" or Windows "caret"',
'[&TSE Cursor];[&Windows Caret]')
when 1
Hook(_IDLE_, idle)
Set(Cursor, OFF)
Warn('1st Query(Cursor) in Main ='; iif(Query(Cursor), 'ON', 'OFF'))
when 2
HideCaret(GetWinHandle())
PurgeMacro(CurrMacroFilename())
otherwise
PurgeMacro(CurrMacroFilename())
endcase
end Main




Carlo Hogeveen

unread,
Oct 24, 2025, 4:02:23 AM (13 days ago) Oct 24
to sem...@googlegroups.com

I should have been more specific:
Whatever options I try, I still see a text cursor blinking.

Carlo



Carlo Hogeveen

unread,
Oct 24, 2025, 4:19:56 AM (13 days ago) Oct 24
to sem...@googlegroups.com

Reading
https://learn.microsoft.com/en-us/windows/win32/menurc/using-carets
gave me the idea to Set(Cursor, OFF) during the _idle_ hook, and that does turn the text cursor OFF.
Weird, but it works so far. So it seems I have a solution.

Carlo



Reply all
Reply to author
Forward
0 new messages