View Single Post
Old 01-27-2021, 07:58 PM   #97
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,860
Karma: 6120478
Join Date: Nov 2009
Device: many
I fixed that ToggleFormatSelection routine to actually make sense and work when it checks if the selection end was in a tag. The original code had an off by one as the end() points *past* the last character selected (much like python substrings ranges are done).

So with this change, all of the Bold, Italic, etc started working for me.

I have NO IDEA how the original code actually worked at all. It was broken from the very beginning.

I think my actually fixing the detection of being in a tag has exposed this issue.

Please try a pull from master and let me know if you still run into any trouble.

Thanks!


Quote:
Originally Posted by BeckyEbook View Post
I don't remember when exactly it stopped working, but the very first commit on December 18 made the tagging different.
Certainly, this group of commits is suspicious (image).

I did not report it before - after all, the work was "in progress", the changes were significant, and I stopped understanding them.

Last edited by KevinH; 01-27-2021 at 08:02 PM.
KevinH is offline   Reply With Quote