Chromium Code Reviews| Index: ui/base/ime/input_method_ibus.cc |
| diff --git a/ui/base/ime/input_method_ibus.cc b/ui/base/ime/input_method_ibus.cc |
| index cce1f3df04ca479ac372ea4447e5a0e11598b184..0b2f4e2efae2af28ba3645794188424f67d85e93 100644 |
| --- a/ui/base/ime/input_method_ibus.cc |
| +++ b/ui/base/ime/input_method_ibus.cc |
| @@ -267,13 +267,10 @@ void InputMethodIBus::OnCaretBoundsChanged(const TextInputClient* client) { |
| previous_selection_range_ = selection_range; |
| previous_surrounding_text_ = surrounding_text; |
| - // In the original meaning of SetSurroundingText is not just selection text, |
| - // but currently there are no way to retrieve surrounding text in |
| - // TextInputClient. |
| GetInputContextClient()->SetSurroundingText( |
| UTF16ToUTF8(surrounding_text), |
| - selection_range.start(), /* cursor position. */ |
| - selection_range.end()); /* selection anchor position. */ |
| + selection_range.start() - text_range.start(), // cursor position. |
| + selection_range.end() - text_range.end()); // selection anchor position. |
|
kinaba
2013/04/10 04:12:35
Shouldn't it be text_range.start(), not the .end()
Seigo Nonaka
2013/04/10 04:22:26
Yes, good catch! thank you very much!
On 2013/04/1
|
| } |
| void InputMethodIBus::CancelComposition(const TextInputClient* client) { |