I just discovered a problem regarding the cursor and with it calculating if we hit an inset or not. The problem is that the x and y position of a cursor.pos (cursor.x and cursor.y) show the actual coordinates of the cursor but they can change when we are inside a text-inset so for example: cursor.pos = 7 when outside inset then: cursor.x = 68 cursor.y = 98 when inside the inset: cursor.x = 4 cursor.y = 114 So now if we enter in the ButtonPress event (BufferView.C) and it checks if we hit a display() inset it says no we didn't and then unlocks the inset! After that we go inside the ButtonRelease event and now we have the x-y position from the real cursor (in LyXText) and it now finds the inset and tells me I hit one! This is IMO wrong (and does give a wrong behaviour), but (hopefully you understand what I mean with this) how can we fix this? If you want to try it just insert an inset-foot (or ert) and click with the mouse when the inset is open above the inset but right of the text! Jürgen P.S.: I also noticed that the cursor-pos is set to 0 and so the cursor put there in some cases when hitting insets, very strange! We have problems in there now and should find to fix them before going on with changing other code in BufferView!!! -._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._ Dr. Jürgen Vigna E-Mail: [EMAIL PROTECTED] Italienallee 13/N Tel: +39-0471-450260 I-39100 Bozen Fax: +39-0471-450296 ITALY Web: http://www.sad.it/~jug You will inherit millions of dollars. -._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._