diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-19 21:57:43 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-19 21:57:43 +0000 |
commit | 550c3e26b321ffb138d02f02c22e64f3e3044767 (patch) | |
tree | 28a882400412b8279a163d929609d5d979777fcd /plugins/SpellChecker/src/utils.cpp | |
parent | eb62e51f57fee452aae04366335059b01c38c1cc (diff) |
fix for cleaning [u] in release version
git-svn-id: http://svn.miranda-ng.org/main/trunk@11024 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SpellChecker/src/utils.cpp')
-rw-r--r-- | plugins/SpellChecker/src/utils.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp index 854ff61146..d4b3fa7138 100644 --- a/plugins/SpellChecker/src/utils.cpp +++ b/plugins/SpellChecker/src/utils.cpp @@ -30,7 +30,7 @@ void SetUnderline(Dialog *dlg, int pos_start, int pos_end) dlg->re->SetSel(pos_start, pos_end);
CHARFORMAT2 cf;
- cf.cbSize = sizeof(CHARFORMAT2);
+ cf.cbSize = sizeof(cf);
cf.dwMask = CFM_UNDERLINE | CFM_UNDERLINETYPE;
cf.dwEffects = CFE_UNDERLINE;
cf.bUnderlineType = opts.underline_type + CFU_UNDERLINEDOUBLE;
@@ -55,15 +55,16 @@ void SetNoUnderline(RichEdit *re, int pos_start, int pos_end) re->SetSel(i, min(i + 1, pos_end));
CHARFORMAT2 cf;
- cf.cbSize = sizeof(CHARFORMAT2);
+ cf.cbSize = sizeof(cf);
re->SendMessage(EM_GETCHARFORMAT, (WPARAM)SCF_SELECTION, (LPARAM)&cf);
BOOL mine = IsMyUnderline(cf);
if (mine) {
- cf.cbSize = sizeof(CHARFORMAT2);
+ cf.cbSize = sizeof(cf);
cf.dwMask = CFM_UNDERLINE | CFM_UNDERLINETYPE;
cf.dwEffects = 0;
cf.bUnderlineType = CFU_UNDERLINE;
+ cf.bUnderlineColor = 0;
re->SendMessage(EM_SETCHARFORMAT, (WPARAM)SCF_SELECTION, (LPARAM)&cf);
}
}
@@ -72,10 +73,11 @@ void SetNoUnderline(RichEdit *re, int pos_start, int pos_end) re->SetSel(pos_start, pos_end);
CHARFORMAT2 cf;
- cf.cbSize = sizeof(CHARFORMAT2);
+ cf.cbSize = sizeof(cf);
cf.dwMask = CFM_UNDERLINE | CFM_UNDERLINETYPE;
cf.dwEffects = 0;
cf.bUnderlineType = CFU_UNDERLINE;
+ cf.bUnderlineColor = 0;
re->SendMessage(EM_SETCHARFORMAT, (WPARAM)SCF_SELECTION, (LPARAM)&cf);
}
}
@@ -610,7 +612,7 @@ LRESULT CALLBACK EditProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) else {
// Remove underline of current word
CHARFORMAT2 cf;
- cf.cbSize = sizeof(CHARFORMAT2);
+ cf.cbSize = sizeof(cf);
dlg->re->SendMessage(EM_GETCHARFORMAT, (WPARAM)SCF_SELECTION, (LPARAM)&cf);
if (IsMyUnderline(cf)) {
|