Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

CopyBlock() bug/inconvenience

25 views
Skip to first unread message

Carlo Hogeveen

unread,
Jan 19, 2025, 11:12:46 AMJan 19
to Semware @ GoogleGroups

Sammy,

I am working on an improved version of eList, and run into a TSE inconvenience, which may be a bug.
When doing a CopyBlock() inside the _AFTER_NONEDIT_COMMAND_ hook, CopyBlock() does not show its progress.
Even for a gigabyte buffer this only takes seconds of apparent inaction, but a fix would be user-friendly.
I created a test macro which demonstrates the problem:
https://ecarlo.nl/tse/DemosAndTests.html#Test_CopyBlock

Carlo



S.E. Mitchell

unread,
Jan 20, 2025, 8:12:06 AMJan 20
to sem...@googlegroups.com
Yeah, right now, the code specifically forbids messages displaying
when QueryEditState() returns non-zero.
There are many parts to the editor that are possibly not reentrant,
and message displaying is one of them.
Inside your hook, can you run QueryEditState() and let me know what
the value is?
Based on that, I may be able to loosen up the restriction so that the
message is displayed.
--
> --
>
> ---
> 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/000401db6a8c%24f61fda90%24e25f8fb0%24%40ecarlo.nl.

Carlo Hogeveen

unread,
Jan 20, 2025, 8:26:55 AMJan 20
to sem...@googlegroups.com

QueryEditState() is 0x60, which according to my notes means that the states _STATE_POPWINDOW_ and _STATE_PROCESS_IN_WINDOW_ are true.

Obviously not breaking the editor is more important than freezing it without a message for some seconds.

Carlo
To view this discussion visit https://groups.google.com/d/msgid/semware/CA%2BgEvkZt0qJf-D4iBezkHwEw5Kdm4sTusjMwdtv71ycJvtu3TA%40mail.gmail.com.

S.E. Mitchell

unread,
Jan 20, 2025, 8:56:23 AMJan 20
to sem...@googlegroups.com
I'm going through the code, and I think I can relax the restriction
for all but _STATE_WARN_.
I will play with it and let you know.
--
> To view this discussion visit https://groups.google.com/d/msgid/semware/000001db6b3e%24f6be90b0%24e43bb210%24%40ecarlo.nl.

Carlo Hogeveen

unread,
Jan 27, 2025, 5:21:20 AMJan 27
to sem...@googlegroups.com

Sammy,

For your information,
When optimizing the next version of my eList tool for speed, I was able to optimize the part away that did a copy of the whole source buffer using CopyBlock().
So CopyBlock() not showing a progress indicator from inside the _AFTER_NONEDIT_COMMAND_ hook is no longer an issue for this specific macro.
To view this discussion visit https://groups.google.com/d/msgid/semware/CA%2BgEvkaVgxukb1L0i0%3D38KYa%2B4bvXsVkimjt_52dH%2Bwb_YKFjw%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages