Skip to content

Instantly share code, notes, and snippets.

@ueno
Created April 12, 2010 06:34
Show Gist options
  • Save ueno/363326 to your computer and use it in GitHub Desktop.
Save ueno/363326 to your computer and use it in GitHub Desktop.
diff --git a/src/engine.c b/src/engine.c
index dcfbe48..ed82f43 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -623,6 +623,12 @@ ibus_m17n_engine_callback (MInputContext *context,
else if (command == Minput_reset) {
}
else if (command == Minput_get_surrounding_text) {
+ gchar *text;
+ gint cursor_index;
+ ibus_engine_get_surrounding_text ((IBusEngine *) m17n, &text,
+ &cursor_index);
+ g_print ("ibus_engine_get_surrounding_text ('%s', %d)\n",
+ text, cursor_index);
}
else if (command == Minput_delete_surrounding_text) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment