Code enhancement: Make Globallock and GlobalUnlock symetric

This commit is contained in:
Don HO 2019-11-16 16:54:21 +01:00
parent ebe0b1b189
commit 30e545a5f4
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E
3 changed files with 5 additions and 4 deletions

View File

@ -377,7 +377,7 @@ void Notepad_plus::command(int id)
_pEditView->execute(SCI_REPLACESEL, 0, reinterpret_cast<LPARAM>("")); _pEditView->execute(SCI_REPLACESEL, 0, reinterpret_cast<LPARAM>(""));
_pEditView->execute(SCI_ADDTEXT, *lpLen, reinterpret_cast<LPARAM>(lpchar)); _pEditView->execute(SCI_ADDTEXT, *lpLen, reinterpret_cast<LPARAM>(lpchar));
GlobalUnlock(hglb); GlobalUnlock(hglbLen);
} }
} }
} }

View File

@ -64,7 +64,7 @@ ClipboardData ClipboardHistoryPanel::getClipboadData()
{ {
clipboardData.push_back(static_cast<unsigned char>(lpchar[i])); clipboardData.push_back(static_cast<unsigned char>(lpchar[i]));
} }
GlobalUnlock(hglb); GlobalUnlock(hglbLen);
} }
} }
} }
@ -76,7 +76,8 @@ ClipboardData ClipboardHistoryPanel::getClipboadData()
clipboardData.push_back(static_cast<unsigned char>(lpchar[i])); clipboardData.push_back(static_cast<unsigned char>(lpchar[i]));
} }
} }
GlobalUnlock(hglb); GlobalUnlock(hglb);
GlobalUnlock(hglb);
} }
} }
CloseClipboard(); CloseClipboard();

View File

@ -687,7 +687,7 @@ void WindowsDlg::resetSelection()
{ {
if (*itr == curSel) if (*itr == curSel)
{ {
ListView_SetItemState(_hList, pos, LVIS_SELECTED|LVIS_FOCUSED, LVIS_SELECTED|LVIS_FOCUSED) ListView_SetItemState(_hList, pos, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
} }
else else
{ {