From 929a9140240addb1af50a949d906ee4f50ea6829 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Mon, 25 Dec 2006 22:52:21 +0000 Subject: [PATCH] Originally committed to SVN as r613. --- core/subs_edit_ctrl.cpp | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) 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')) {