Release v0.6.38: avoid unnecessary RichEdit and cancel hidden history previews
This commit is contained in:
+4
-1
@@ -912,6 +912,7 @@ int main(int argc, char **argv) {
|
||||
ks::showHistory(app,false);
|
||||
auto history=app.historyWindow;
|
||||
require(history&&!IsWindowVisible(history),"history layout tested without changing focus");
|
||||
require(!GetDlgItem(history,105),"history creates no RichEdit control before formatted content is displayed");
|
||||
{
|
||||
app.history=std::make_unique<ks::History>(temp/L"history-search");
|
||||
app.history->add(ks::textClip(L"згенеруй приклад"),L"test",app.settings);
|
||||
@@ -941,7 +942,9 @@ int main(int argc, char **argv) {
|
||||
require(GetFocus()==originalFocus,"history search preserves focus");
|
||||
SendDlgItemMessageW(history,102,LB_SETCURSEL,1,0);
|
||||
ks::refreshHistory(app); // A result may still be in flight when closing.
|
||||
SendMessageW(history,WM_CLOSE,0,0);
|
||||
SendDlgItemMessageW(history,101,WM_KEYDOWN,VK_ESCAPE,0);
|
||||
require(!IsWindowVisible(history) && !GetDlgItem(history,105),
|
||||
"Escape closes history and leaves no RichEdit control");
|
||||
SendMessageW(history,WM_TIMER,1,0); // KillTimer cannot retract a posted timer message.
|
||||
require(pumpUntil(0),"closing history releases list strings");
|
||||
auto until=GetTickCount64()+250;
|
||||
|
||||
Reference in New Issue
Block a user