Macros, Cut & Paste, TextPad 8.3.0 x64, Windows 10 1909
Posted: Thu Apr 16, 2020 2:45 pm
I have encountered a problem using macros which include a cut and paste.
The problem appears to be some form of race condition between the cut and the paste.
This is with TextPad 8.3.0, x64, and Windows 10 1909. It was happening on at least TextPad 8.2 also.
I found another forum post which may have the same issue, and that is with TextPad 4.7.3.
https://www.textpad.com/forums/viewtopic.php?t=13211
And, as suggested in that post, if I add some delaying no-op commands (like 50 move-left move-right combos), the frequency of occurrence is reduced.
When the error does happen, TextPad emits a 'Beep', and the paste buffer is cleared.
A reliable way to reproduce. Create a file with say 100 identical lines. Create a macro which moves some text within a line using cut and paste. And then execute the macro for each line, either manually or with multi-line. More often than not, there will be a 'beep' sometime during the execution, and a line will not be edited correctly. This will also be apparent because all the lines started as identical.
The problem appears to be some form of race condition between the cut and the paste.
This is with TextPad 8.3.0, x64, and Windows 10 1909. It was happening on at least TextPad 8.2 also.
I found another forum post which may have the same issue, and that is with TextPad 4.7.3.
https://www.textpad.com/forums/viewtopic.php?t=13211
And, as suggested in that post, if I add some delaying no-op commands (like 50 move-left move-right combos), the frequency of occurrence is reduced.
When the error does happen, TextPad emits a 'Beep', and the paste buffer is cleared.
A reliable way to reproduce. Create a file with say 100 identical lines. Create a macro which moves some text within a line using cut and paste. And then execute the macro for each line, either manually or with multi-line. More often than not, there will be a 'beep' sometime during the execution, and a line will not be edited correctly. This will also be apparent because all the lines started as identical.