Release v0.6.20: edit history images and share smooth wheel handling

This commit is contained in:
2026-10-31 09:12:59 +02:00
parent 6603d28f68
commit 70ea9b10bc
22 changed files with 334 additions and 33 deletions
+15
View File
@@ -1,4 +1,5 @@
#include "autocorrect.h"
#include "history_preview.h"
#include "ocr.h"
#include "richtext.h"
#include "storage.h"
@@ -22,6 +23,20 @@ void rejects(const std::function<void()> &f, const char *name)
bool thrown = false;
try
{
{
std::map<std::wstring,int> previews;
std::set<std::wstring> visible;
for(int i=0;i<40;++i) previews[std::to_wstring(i)]=i;
for(int i=0;i<8;++i) visible.insert(std::to_wstring(i));
ks::trimHistoryPreviews(previews,visible);
require(previews.size()==32,"preview cache stays bounded");
for(const auto &id:visible) require(previews.contains(id),"visible preview survives eviction");
for(int i=0;i<40;++i) { auto id=std::to_wstring(i); previews[id]=i; visible.insert(id); }
ks::trimHistoryPreviews(previews,visible);
require(previews.size()==40,"tall viewport does not thrash visible previews");
visible.clear(); ks::trimHistoryPreviews(previews,visible);
require(previews.size()==32,"cache shrinks after leaving tall viewport");
}
f();
}
catch (...)