diff --git a/core/subs_edit_ctrl.cpp b/core/subs_edit_ctrl.cpp index 14afd8b53..57c6ef306 100644 --- a/core/subs_edit_ctrl.cpp +++ b/core/subs_edit_ctrl.cpp @@ -474,6 +474,13 @@ void SubsTextEditCtrl::ShowPopupMenu(int activePos) { } } + // Has suggestions + if (result.size()) { + wxFont font; + font.SetStyle(wxFONTSTYLE_ITALIC); + menu.Append(EDIT_MENU_THESAURUS,wxString::Format(_("Thesaurus suggestions for \"%s\":"),currentWord.c_str()))->SetFont(font); + } + // Build menu int curThesEntry = 0; for (unsigned int i=0;i= pos) { + firstDelimAfter = i; + break; + } + depth++; + } + if (cur == '}') { + if (i < pos) { + lastDelimBefore = i; + } + depth--; + } + if (depth != 0) { + // Picked a location in invalid depth + if (pos == i) { + lastDelimBefore = -1; + firstDelimAfter = 0; + break; + } + continue; + } // Line breaks if (cur == '\\' && (next == 'N' || next == 'n' || next == 'h')) {