Skip to content
  • Michael Natterer's avatar
    app: fix various undo- and preedit-related text tool issues · cd147a4a
    Michael Natterer authored
    In the text tool editor code, connect to GtkIMContext::preedit-start
    and introduce a boolean text_tool->preedit_active which indicates that
    a preedit is going on.
    
    Remove the new preedit-removal code from gimp_text_tool_reset_im_context()
    because it was not reflecting the IM's internal state and made things
    worse. Instead, added gimp_text_tool_abort_im_context() which really
    gets rid of any ongoing preedit by force.
    
    In the main text tool code, check for preedit_active and if TRUE,
    apply any edits directly widhout pushing undo steps. Factored out
    gimp_text_tool_apply_list() for that purpose in order not do
    duplicate a lot of code.
    
    On undo and on button_press, force-abort any ongoing preedit. This is
    the right thing to do on undo, but not really on button_press, but I
    don't see another way to keep states consistent.
    cd147a4a