- win->keypress_handler = g_signal_connect( G_OBJECT(textview), "key-press-event", G_CALLBACK(on_window_key_press_event), win );
- g_signal_handler_block( G_OBJECT(textview), win->keypress_handler );
+ win->char_input_keypress_handler = g_signal_connect( textview, "key-press-event", G_CALLBACK(on_char_input_key_press_event), win );
+ g_signal_handler_block(textview, win->char_input_keypress_handler);
+ win->line_input_keypress_handler = g_signal_connect( textview, "key-press-event", G_CALLBACK(on_line_input_key_press_event), win );
+ g_signal_handler_block(textview, win->line_input_keypress_handler);
+
+ win->insert_text_handler = g_signal_connect_after( textbuffer, "insert-text", G_CALLBACK(after_window_insert_text), win );
+ g_signal_handler_block(textbuffer, win->insert_text_handler);