Actually, tabsize can not be 0.
Fixed and committed to SVN.
Best,
Scuri
2018-01-21 22:48 GMT-02:00 Ranier VF <[email protected]>:
> Hi Scuri,
> IMHO the version of changeTabsToSpaces, can be better.
> What do you think of this version?
>
> --- a\srcscintilla\iup_scintilladlg.c Sun Jan 21 22:40:55 2018
> +++ b\srcscintilla\iup_scintilladlg.c Sun Jan 21 22:43:36 2018
> @@ -308,13 +308,13 @@
> continue;
>
> IupTextConvertPosToLinCol(multitext, i, &lin, &col);
> + IupSetStrf(multitext, "DELETERANGE", "%d,%d", i, 1);
>
> if (tabSize == 0)
> - spacesToNextTab = 0;
> - else
> - spacesToNextTab = tabSize - (col + 1) % tabSize + 1;
> -
> - IupSetStrf(multitext, "DELETERANGE", "%d,%d", i, 1);
> + {
> + continue;
> + }
> + spacesToNextTab = tabSize - (col + 1) % tabSize + 1;
>
> for (j = 0; j < spacesToNextTab; j++)
> IupSetAttributeId(multitext, "INSERT", i + j, " ");
>
> This line IupTextConvertPosToLinCol(multitext, i, &lin, &col);
> really affects multitext?
>
> Best.
> Ranier Vilela
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Iup-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/iup-users
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users