New version: 4.50.20 released

38 views
Skip to first unread message

S.E. Mitchell

unread,
Feb 28, 2026, 10:05:50 AM (12 days ago) Feb 28
to TSEPro Support
Get it here: https://semware.com/files/tse-pro-install/tse-linux-4.50.20.zip

---------------------------------------------------------------------------------
28 Feb 2026 v4.50.20
---------------------------------------------------------------------------------
New commands: (see the help for more info on the new commands)
--------------------------------------------------------------

Clamp()
SetMouseCursor() (new command (not the name) suggested by Carlo Hogeveen)

Updates:
--------

Carlo Hogeveen - allow assignments in expressions in .s files,
as is already one in .si files.

Help Updates:
-------------

Need to update SqueezePath doc - should be _USE_HOME_PATH_, not _HOME_PATH_

many: need to update strfind() doc - example from:
if StrFind(haystack, "B0000.*\.msg", "x")
to:
if StrFind("B0000.*\.msg", haystack, "x")

Carlo Hogeveen:LoadDir() does not describe that it will return a
different value when
influenced by -i or TSELOADDIR.

Bug fixes:
----------

Carlo Hogeveen:Fix windows .ui re: ascii chart in prompts

Carlo Hogeveen:
If LoadHistory() has a non-existent file as a parameter or
tsehist.dat does not exist, then LoadHistory() sets
NumHistoryNames() to 0, but no histories are deleted from TSE's
history lists buffer.
That is inconsistent and corrupts TSE's history lists buffer.
***Code changed to clear history buffer in this case.

Also need a different message if the help file does not exist.

Files that have a mix of end-of-line types are not loaded correctly.
Fixed. Thanks to Carlo Hogeveen for the report.

Other:
------

Tom Collins found an issue with "for" and "downto".
The "help" has been updated with the following:

"When 'downto' is used, the 'by' value (explicit or implied) is subtracted
from the initial value at each iteration; therefore, the 'by' value should
generally be positive. Only use a negative 'by' value if you know what you
are doing."

Additionally, the macro compiler will note that it is a possibly
endless loop.

S.E. Mitchell

unread,
Feb 28, 2026, 10:28:56 AM (12 days ago) Feb 28
to TSEPro Support
Actual link should be:
https://semware.com/files/tse-pro-install/tse-setup-4.50.20.zip
Sorry about that :(

Carlo Hogeveen

unread,
Feb 28, 2026, 1:01:41 PM (12 days ago) Feb 28
to sem...@googlegroups.com

In Windows GUI TSE I tested the new SetMouseCursor() command with the macro below.
The command works OK, but with a note.

Setting the mouse cursor shapes _MC_SIZE_ and _MC_ICON_ does nothing on my computer.
When I call the underlying Windows functions myself these two shapes also do not work on my computer, so on my computer this is not a TSE error.

Carlo



proc Main()
integer i = 0
string mouse_type_numbers[MAXSTRINGLEN] = ''
string mouse_type_names [MAXSTRINGLEN] = ''

mouse_type_numbers = Format(_MC_ARROW_;
_MC_IBEAM_;
_MC_WAIT_;
_MC_CROSS_;
4 _MC_UPARROW_;
_MC_SIZE_; // ?
_MC_ICON_; // ?
_MC_SIZENWSE_;
_MC_SIZENESW_;
_MC_SIZEWE_;
_MC_SIZENS_;
_MC_SIZEALL_;
_MC_NO_;
_MC_HAND_;
_MC_APPSTARTING_;
_MC_HELP_;
_MC_PIN_;
_MC_PERSON_)

mouse_type_names = Format('_MC_ARROW_';
'_MC_IBEAM_';
'_MC_WAIT_';
'_MC_CROSS_';
'_MC_UPARROW_';
'_MC_SIZE_';
'_MC_ICON_';
'_MC_SIZENWSE_';
'_MC_SIZENESW_';
'_MC_SIZEWE_';
'_MC_SIZENS_';
'_MC_SIZEALL_';
'_MC_NO_';
'_MC_HAND_';
'_MC_APPSTARTING_';
'_MC_HELP_';
'_MC_PIN_';
'_MC_PERSON_')

for i = 1 to NumTokens(mouse_type_numbers, ' ')
Message(i; 'of'; NumTokens(mouse_type_numbers, ' '), ':';
GetToken(mouse_type_names, ' ', i))
SetMouseCursor(Val(GetToken(mouse_type_numbers, ' ', i)))
Delay(54)
endfor
Message('')

PurgeMacro(CurrMacroFilename())
end Main





Carlo Hogeveen

unread,
Feb 28, 2026, 2:06:41 PM (12 days ago) Feb 28
to sem...@googlegroups.com

Carlo Hogeveen:
> If LoadHistory() has a non-existent file as a parameter or
> tsehist.dat does not exist, then LoadHistory() sets
> NumHistoryNames() to 0, but no histories are deleted from TSE's
> history lists buffer.
> That is inconsistent and corrupts TSE's history lists buffer.

Sammy:
> ***Code changed to clear history buffer in this case.

No, my tests say that LoadHistory('IdoNotExist') now reloads tsehist.dat and sets NumHistoryNames() accordingly.
Which is an improvement, because LoadHistory() no longer corrupts the history buffer in case of a non-existing file parameter.
It is an impoverishment in that I can no longer set NumHistoryItems() to 0 without creating a dummy history file to load, but that is the lesser evil.
Especially because I no longer have a business case where I need to do that.
I am OK with the current solution.
I suggest documenting LoadHistory(<non-existent file>) in the next TSE release.

Carlo



S.E. Mitchell

unread,
Feb 28, 2026, 7:32:30 PM (11 days ago) Feb 28
to sem...@googlegroups.com
Hmmm. That wasn't the intent.
Here is the old code:
public integer proc _cmLoadHistory(string hist_fn)
integer prev_id

num_user_historys = 0
if not FileExists(HistoryFilename(hist_fn))
return (FALSE)
endif
prev_id = GotoBufferId(HISTORY_ID)
if not _cmLoadBuffer(HistoryFilename(hist_fn), -2) or
GetText(2, sizeof(history_signature)) <> history_signature
EmptyBuffer()
GotoBufferId(prev_id)
return (Warn(BOGUS_HISTORY))
endif
num_user_historys = CurrChar(1)
ClearLine()
GotoBufferId(prev_id)
return (TRUE)
end

And here is the new code:
public integer proc _cmLoadHistory(string hist_fn)
integer prev_id, exists

num_user_historys = 0
prev_id = GotoBufferId(HISTORY_ID)
exists = FileExists(HistoryFilename(hist_fn))
if not exists or
not _cmLoadBuffer(HistoryFilename(hist_fn), -2) or
GetText(2, sizeof(history_signature)) <> history_signature
EmptyBuffer()
GotoBufferId(prev_id)
return (iif(exists, Warn(BOGUS_HISTORY), FALSE))
endif
num_user_historys = CurrChar(1)
ClearLine()
GotoBufferId(prev_id)
return (TRUE)
end
> --
>
> ---
> 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/000c01dca8e5%245d90cc60%2418b26520%24%40ecarlo.nl.

Carlo Hogeveen

unread,
Mar 1, 2026, 6:12:14 AM (11 days ago) Mar 1
to sem...@googlegroups.com

Found it.
This is another old bug.
Both the old and new LoadHistory() do empty the history buffer completely when provided with a non-existing history file parameter.
However, when the user continues editing, other, later history commands reload tsehist.dat if the history buffer has 0 lines.
A solution would be to not just empty the history buffer, but to also add an empty line.
The history buffer is expected to start with an empty line.

Carlo



Claus Futtrup

unread,
Mar 1, 2026, 7:17:29 AM (11 days ago) Mar 1
to sem...@googlegroups.com

>Both the old and new LoadHistory() do empty the history buffer completely when provided with a non-existing history file parameter.

Now that it's documented, it becomes a feature. :-)

Guy Rouillier

unread,
Mar 1, 2026, 11:38:29 PM (10 days ago) Mar 1
to sem...@googlegroups.com
First link was for Linux version, this one is for Windows. I verified by
looking in the originally posted zip that it contains the Linux version. So,
looks like both links are relevant.

Thanks.
--
Guy Rouillier

Carlo Hogeveen

unread,
Mar 2, 2026, 5:12:02 AM (10 days ago) Mar 2
to sem...@googlegroups.com

Thanks Guy,
I found that the Linux release is now also available in the standard Linux archive format, which does not force us to first install an unzip tool:
https://semware.com/files/tse-pro-install/tse-linux-4.50.20.tgz
Carlo



Reply all
Reply to author
Forward
0 new messages