Codebase list mozc / 0796f51
Enable undo-commit iff IBUS_CAP_SURROUNDING_TEXT is set. Ibus doesn't have any appropriate capability flag to indicate when we can reliably use |ibus_engine_delete_surrounding_text|. With this CL, undo-commit is enabled more conservatively. It now requires the client to set IBUS_CAP_SURROUNDING_TEXT bit. Closes #296. BUG=#296 TEST=compile Yohei Yukawa 8 years ago
2 changed file(s) with 7 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
00 MAJOR=2
11 MINOR=17
2 BUILD=2107
2 BUILD=2108
33 REVISION=102
44 # NACL_DICTIONARY_VERSION is the target version of the system dictionary to be
55 # downloaded by NaCl Mozc.
715715
716716 switch (callback_command.type()) {
717717 case commands::SessionCommand::UNDO:
718 // As far as I've tested on Ubuntu 11.10, most of applications which
719 // accept 'ibus_engine_delete_surrounding_text' doe not set
720 // IBUS_CAP_SURROUNDING_TEXT bit.
721 // So we should carefully uncomment the following code.
722 // -----
723 // if (!(engine->client_capabilities & IBUS_CAP_SURROUNDING_TEXT)) {
724 // return false;
725 // }
718 // Having |IBUS_CAP_SURROUNDING_TEXT| does not necessarily mean that the
719 // client supports |ibus_engine_delete_surrounding_text()|, but there is
720 // no other good criteria.
721 if (!(engine->client_capabilities & IBUS_CAP_SURROUNDING_TEXT)) {
722 return false;
723 }
726724 break;
727725 case commands::SessionCommand::CONVERT_REVERSE: {
728726 if (!GetSurroundingText(engine,