From b4aa113facdfa0b8aeaf2fca0f8aa54cbf3f3cd7 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Sat, 5 Jun 2021 01:48:10 -0600 Subject: [PATCH] turn off repetiton filter by default, use google by default, increase max hook count, replace regex with capture --- GUI/extenwindow.cpp | 2 +- GUI/host/textthread.h | 2 +- extensions/regexfilter.cpp | 2 +- texthook/texthook.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/GUI/extenwindow.cpp b/GUI/extenwindow.cpp index 157236b..76c5e80 100644 --- a/GUI/extenwindow.cpp +++ b/GUI/extenwindow.cpp @@ -19,7 +19,7 @@ extern const char* EXTEN_WINDOW_INSTRUCTIONS; namespace { constexpr auto EXTEN_SAVE_FILE = u8"SavedExtensions.txt"; - constexpr auto DEFAULT_EXTENSIONS = u8"Remove Repeated Characters>Remove Repeated Phrases>Regex Filter>Copy to Clipboard>Bing Translate>Extra Window>Extra Newlines>Styler"; + constexpr auto DEFAULT_EXTENSIONS = u8"Remove Repeated Characters>Remove Repeated Phrases>Regex Filter>Copy to Clipboard>Google Translate>Extra Window>Extra Newlines>Styler"; struct Extension { diff --git a/GUI/host/textthread.h b/GUI/host/textthread.h index c796561..a58c292 100644 --- a/GUI/host/textthread.h +++ b/GUI/host/textthread.h @@ -8,7 +8,7 @@ public: using OutputCallback = bool(*)(TextThread&, std::wstring&); inline static OutputCallback Output; - inline static bool filterRepetition = true; + inline static bool filterRepetition = false; inline static int flushDelay = 400; // flush every 400ms by default inline static int maxBufferSize = 1000; inline static int maxHistorySize = 10'000'000; diff --git a/extensions/regexfilter.cpp b/extensions/regexfilter.cpp index c59caf4..69560f9 100644 --- a/extensions/regexfilter.cpp +++ b/extensions/regexfilter.cpp @@ -12,7 +12,7 @@ extern const char* CURRENT_FILTER; const char* REGEX_SAVE_FILE = "SavedRegexFilters.txt"; std::optional regex; -std::wstring replace; +std::wstring replace = L"$1"; std::shared_mutex m; DWORD (*GetSelectedProcessId)() = nullptr; diff --git a/texthook/texthook.h b/texthook/texthook.h index f0b9ccd..db3b728 100644 --- a/texthook/texthook.h +++ b/texthook/texthook.h @@ -51,6 +51,6 @@ private: }; -enum { MAX_HOOK = 300, HOOK_BUFFER_SIZE = MAX_HOOK * sizeof(TextHook), HOOK_SECTION_SIZE = HOOK_BUFFER_SIZE * 2 }; +enum { MAX_HOOK = 2500, HOOK_BUFFER_SIZE = MAX_HOOK * sizeof(TextHook), HOOK_SECTION_SIZE = HOOK_BUFFER_SIZE * 2 }; // EOF