aboutsummaryrefslogtreecommitdiffstats
path: root/apps/windoze/CBuilder5/BibleCS/mainfrm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'apps/windoze/CBuilder5/BibleCS/mainfrm.cpp')
-rw-r--r--apps/windoze/CBuilder5/BibleCS/mainfrm.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/windoze/CBuilder5/BibleCS/mainfrm.cpp b/apps/windoze/CBuilder5/BibleCS/mainfrm.cpp
index 511d501..5df1c50 100644
--- a/apps/windoze/CBuilder5/BibleCS/mainfrm.cpp
+++ b/apps/windoze/CBuilder5/BibleCS/mainfrm.cpp
@@ -547,13 +547,13 @@ void __fastcall TForm1::DictionaryLookup1Click(TObject *Sender)
SWDispRTF *rtf = (SWDispRTF *)Screen->ActiveControl;
int wordstart;
int saveSelStart = rtf->SelStart;
- String lookupKey;
+ WideString lookupKey;
ConfigEntMap::iterator eit;
char preChar = 0;
if (!rtf->SelLength) {
preChar = (rtf->WordAtCursor().Length()) ? rtf->WordAtCursor()[1] : 0;
- lookupKey = TrimJunk(rtf->WordAtCursor());
+ lookupKey = rtf->WordAtCursor();
}
else {
preChar = rtf->Text[(rtf->SelStart)?rtf->SelStart:0];
@@ -562,12 +562,13 @@ void __fastcall TForm1::DictionaryLookup1Click(TObject *Sender)
// check if all digits (strongs)
int i;
- for (i = 0; i < strlen(lookupKey.c_str()); i++) {
- if (!isdigit(lookupKey.c_str()[i]))
+ for (i = 0; i < lookupKey.Length(); i++) {
+ if (!isdigit(lookupKey[i+1]) && !strchr("<>()", lookupKey[i+1]))
break;
}
- if ((i == strlen(lookupKey.c_str())) && (i)) {
+ if ((i == lookupKey.Length()) && (i)) {
+ lookupKey = TrimJunk(lookupKey);
String curLex = LexDictPageControl->ActivePage->Caption;
String feature = (DefaultVSKey->Testament() == 1)?"Hebrew":"Greek";
feature += (preChar == '(')?"Parse":"Def";
@@ -584,7 +585,7 @@ void __fastcall TForm1::DictionaryLookup1Click(TObject *Sender)
}
}
- DictKeyEdit->Text = UTF8ToWideString(lookupKey);
+ DictKeyEdit->Text = lookupKey;
}