Release v0.6.38: avoid unnecessary RichEdit and cancel hidden history previews
This commit is contained in:
+2
-1
@@ -252,7 +252,7 @@ DWORD CALLBACK readStream(DWORD_PTR cookie, LPBYTE buffer, LONG size, LONG *read
|
||||
return 0;
|
||||
}
|
||||
} // namespace
|
||||
std::string richPreview(const Clip &clip)
|
||||
std::string richPreview(const Clip &clip, bool plainFallback)
|
||||
{
|
||||
for (const auto &f : clip.formats)
|
||||
if (f.name == L"Rich Text Format" && f.data.size() <= 65536)
|
||||
@@ -276,6 +276,7 @@ std::string richPreview(const Clip &clip)
|
||||
{
|
||||
}
|
||||
}
|
||||
if (!plainFallback) return {};
|
||||
auto text = clip.text();
|
||||
if (text.size() > 4096)
|
||||
text.resize(4096);
|
||||
|
||||
Reference in New Issue
Block a user