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;
|
||||
|
||||
@@ -190,6 +190,8 @@ int main(int argc, char **argv)
|
||||
"HTML entities and Unicode survive without script text");
|
||||
require((effects(0, 6) & CFE_BOLD) != 0, "inline CSS bold is rendered");
|
||||
auto plain = ks::textClip(L"{\\literal} Привіт");
|
||||
require(ks::richPreview(plain, false).empty(), "plain history preview does not require RichEdit");
|
||||
require(!ks::richPreview(styled, false).empty(), "formatted history preview retains HTML rendering");
|
||||
ks::setRichText(rich, ks::richPreview(plain));
|
||||
GetWindowTextW(rich, rendered, 256);
|
||||
require(std::wstring(rendered) == plain.text(), "plain Unicode and RTF metacharacters are escaped");
|
||||
|
||||
Reference in New Issue
Block a user