On Wed, Jan 27, 2010 at 2:18 PM, Ville M. Vainio <[email protected]> wrote:
> Glad that you found a fix - however, remember that there can be > arbitrary number of cursors associated with the document, apart from > the "default" cursor that the user is seeing. You can construct > QTextCursor objects by yourself. Think of them as pointers to the > underlying document. And indeed, Leo's qt code does that. But this should not be a concern. We are using the cursor for its side effect, to delete the requested selection. We are pretty much done, and pretty much stuck. There is, imo, a real and severe bug with cursor.movePosition. We will have difficulty working around this bug in the undo code, for example. In that case, there is no selection to use, so if cursor.movePosition doesn't work we have no workaround. Imo, Leo can easily live with this problem until the Qt folk fix it. I'll be reporting it soon. Edward P.S. I'd like to repeat that it is unlikely that Leo is to blame for this situation. The off-by-one nature of the bug can not come from Leo, because the code usually works. It is much more likely to come from Qt's failure to manage the internal representation of variable-length encodings of unicode characters. EKR -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
