<mclasen> pbor: Is there a reason to not include http://bugzilla.gnome.org/show_bug.cgi?id=141993 in gtksourceview ? Undo is somewhat broken in gedit with recent gtk+
<pbor> mclasen: the main reason is that Gustavo disappeared and Paolo has no internet access :(
<pbor> mclasen: I did the release for 2.8.1 but I dunno gtksourceview internals
<mclasen> pbor: wait, arent you Paolo ?
<pbor> mclasen: I am a Paolo, but not Paolo Maggi :)
<mclasen> pbor: ah, I see. 
<pbor> mclasen: paolo maggi should be back online in the next days, I'll bug him about the patch. Is it urgent enough to warrant a new gtksourceview release for 2.8.1? (kmaaras said we still have some time since he is busy)
<mclasen> pbor: it mainly affects users of non-latin languages, I think. The patch in the bug stops the crash, but it still doesn't behave properly
<mclasen> pbor: it seems that gtksourceview should cancel any outstanding preediting before doing an undo. I don't know if gtktextview exposes api to cancel a preedit, though...
<owen> mclasen: preedit shouldn't be visible to gtksourceview...
<mclasen> owen: if you insert a couple of characters, then do an undo while there is preedit text, gedit removes the regular text, but keeps the preedit text
<mclasen> owen: that looks wrong to me. I think it should remove the preedit text as well
<owen> mclasen: You could cancel preedit various ways - fake a focus-in/focus-out (causing extra redrawing, I guess), or access the private, but unlikely to change, text_view->im_context and call gtk_im_context_reset() on it
<owen> mclasen: I think people are already doing hacks with text_view->im_context
<mclasen> owen: do you agree that undo should remove outstanding preedit together with regular text ?
<owen> mclasen: Actually, hmm. Reset probably acutally commits the outstanding text. Hopefully it does it *synchronously* though that's not at all guaranteed
<owen> mclasen: But it's the only available tool to end the preedit
<owen> mclasen: pretty much agree, yes. Though it's not going to redo unless reset() commits.
<mclasen> owen: committing may not really be possible, if the preedit contains some partially constructed glyph combination, will it ?
<owen> mclasen: Well, reset() will do whatever would happen if the user clicked to move the mouse cursor, so it should be somewhat sensible
<owen> mclasen: other than possibly causing an async commit after the undo
<mclasen> owen: actually, this may be a bit messed up in gtktextview. gtk_text_view_delete_from_cursor() resets the im context, gtk_text_view_insert_at_cursor() does not
<owen> mclasen: is  insert_at_cursor()  called from commit()? If so, it definitely shouldn't reset
<owen> mclasen: I'm not really sure there is any semantic to an application calling insert_at_cursor(), so I don't think we can tell if it should reset or not
<mclasen> owen: no, commit() goes directly to the buffer insert functions
<mclasen> owen: anyway, the undo manager in gtksourceview operates only on the buffer, so it has no chance of handling preedit stuff
