diff options
| author | Peng Wu <alexepico@gmail.com> | 2010-06-23 10:48:29 +0800 |
|---|---|---|
| committer | Peng Wu <alexepico@gmail.com> | 2010-06-23 10:48:29 +0800 |
| commit | fc845a6adc93589000f2cbff2dff60d33706927c (patch) | |
| tree | a005e82e47a2126b403d05abb6410de8c89cb4cb /src/ExtEditor.cc | |
| parent | 83a549ad0dd6872fcea509df02666b5cb6488324 (diff) | |
| download | ibus-libpinyin-fc845a6adc93589000f2cbff2dff60d33706927c.tar.gz ibus-libpinyin-fc845a6adc93589000f2cbff2dff60d33706927c.tar.xz ibus-libpinyin-fc845a6adc93589000f2cbff2dff60d33706927c.zip | |
fixes help display on aux text.
Diffstat (limited to 'src/ExtEditor.cc')
| -rw-r--r-- | src/ExtEditor.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ExtEditor.cc b/src/ExtEditor.cc index 91e4994..36e6cea 100644 --- a/src/ExtEditor.cc +++ b/src/ExtEditor.cc @@ -540,7 +540,12 @@ ExtEditor::updateStateFromInput (void) } if ( command->help ){ - m_auxiliary_text += "\t["; + int space_len = std::max ( 0, m_aux_text_len + - (int) strlen (command->help) + - 2 /* length of "[...]" */); + m_auxiliary_text.append(space_len, ' '); + + m_auxiliary_text += "["; m_auxiliary_text += command->help; m_auxiliary_text += "]"; } |
