Am 29.05.2007 um 18:59 schrieb Dov Feldstern:

Stefan Schimanski wrote:
I just tested again. With the latest version of the patch (http:// permalink.gmane.org/gmane.editors.lyx.devel/85600) I'm getting a crash. To reproduce: (1) make sure RTL option is turned on; (2) start typing (with spaces, just normal typing) until the paragraph breaks to a new line. Start moving backwards (LEFT, assuming LTR). When you hit the beginning of the line and try moving back again, you get a crash. This is the same issue reported by Abdel two weeks ago. Copying the conditions from 1.4 just undoes my fix for that issue. Therefore, I propose to stick with the previous version (http://permalink.gmane.org/ gmane.editors.lyx.devel/85585). I reported this yesterday (http:// permalink.gmane.org/gmane.editors.lyx.devel/85611), but didn't get any reply...

Fixed now. The bidi tables were not updated when changing the row without a boundary==true position in between.

But talking about code quality, how can something like  

if (pos > 0) {
                if (pos == cur.lastpos())
                        --pos;
                else // potentional bug... BUG (Lgb)
                        if (par.isSeparator(pos)) {
                                if (pos > cur.textRow().pos() &&
                                    bidi.level(pos) % 2 ==
                                    bidi.level(pos - 1) % 2)
                                        --pos;
                                else if (pos + 1 < cur.lastpos())
                                        ++pos;
                        }
        }

be in the code without comments??! I learnt long ago that understanding code is uncomputable. But when reading those things one spends time solving this problem again and again.

Stefan


 

Attachment: cursordispatch.patch
Description: Binary data

Attachment: PGP.sig
Description: Signierter Teil der Nachricht

Reply via email to