View Single Post
Old 01-28-2021, 09:39 AM   #100
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,864
Karma: 6120478
Join Date: Nov 2009
Device: many
Auto selecting of a word is only designed to work when the cursor is actually in a word not after a word. Your last case the cursor is after the word and nothing is autoselected. That is how it was designed to work. Highlighting a word and then selecting the format is the normal way this is handled. The auto selection of a word *under* the cursor is Qt not us.

The key is that for a word to be under the cursor the cursor must be in one of the positions indicated by the '|' below, not after the word (one spot for each letter).

|w|o|r|d



So to me it appears to work as expected. What am I missing?

Kevin



Quote:
Originally Posted by BeckyEbook View Post
The issue could only be seen by personally compiling the development build, not the stable build, so it wasn't such a problem. I rarely put tags with B, I, U… so I waited for further work. On the other hand, you rarely commit something that doesn't work later and I was able to get your attention faster.

Back to the recent changes. It's nice, but on December 18th I noticed that adding tags around a word works ALMOST always well:
  • at the beginning of the word: OK
  • in the middle of the word: OK
  • at the end of a word: OK except for one case - immediately after this word there is an opening or closing tag

I am attaching an animated GIF that shows these cases.

And here is the test line of text (I marked in red the places where surrounding by html tag does not work).

Code:
<p>micro|<b>computer|</b></p>
Perhaps applying a similar solution you have been using recently here would help.
KevinH is offline   Reply With Quote