[Cuis-dev] Bugfix - ExtractToTemporary
H. Fernandes
hfern at free.fr
Wed Mar 26 04:11:38 PDT 2025
Hi Joel,
Good catch !
Thanks
Dr. Geo -- http://gnu.org/s/dr-geo
----- Mail original -----
> Hi folks!
> Here I bring a bugfix of ExtractToTemporary with its test.
> The problem was that if a variable declaration does not have a space
> at the end, and someone wants to extract a new temporary, it will
> add the new temporary variable in the middle of the last one.
> Example: Suppose we want to create a temporary variable with the
> highlighted code, and the new variable name will be newVar .
> m1
> |var|
> var := 1.
> ^ var + 2
> After extracting the variable it will end like this
> m1
> |va newVarr|
> var := 1.
> newVar := var + 2.
> ^ newVar
> Checking the code, ExtractToTemporary assumes the last space of
> variable declaration exists. So the fix is checking if the space
> exists or not and return the right index to add the new variable.
> Have a nice day!
> Joel Cámera
> Agile Software Development
> Alem 896, Floor 6, Buenos Aires, Argentina
> +54 9 011 6091 3125
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250326/73872959/attachment.htm>
More information about the Cuis-dev
mailing list