diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-12-28 22:25:13 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-12-28 22:57:53 +0530 |
| commit | c1e05401d5c3cf90440e62a3423d2b52cfc46999 (patch) | |
| tree | c68665ae84a2bd4c289865b2742a8a9752b83197 /src/Chelleport | |
| parent | 1d617d9db665ee9df209777626752a19496387b4 (diff) | |
| download | chelleport-c1e05401d5c3cf90440e62a3423d2b52cfc46999.tar.gz chelleport-c1e05401d5c3cf90440e62a3423d2b52cfc46999.zip | |
Add <c-r> to refresh mode (reload ocr results) + fix search mode reset issue
Diffstat (limited to 'src/Chelleport')
| -rw-r--r-- | src/Chelleport/AppState.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Chelleport/AppState.hs b/src/Chelleport/AppState.hs index a304c96..bcb7dce 100644 --- a/src/Chelleport/AppState.hs +++ b/src/Chelleport/AppState.hs @@ -132,7 +132,7 @@ update _ state ResetKeys = do where resetMode (ModeHints hintsData) = ModeHints $ hintsData {stateKeySequence = [], stateIsMatched = False} resetMode (ModeSearch searchData@(ModeSearchData {searchWords})) = - ModeSearch $ searchData {searchWords = searchWords, searchFilteredWords = searchWords} + ModeSearch $ searchData {searchWords = searchWords, searchFilteredWords = searchWords, searchInputText = ""} -- Initialize current mode update flush state InitializeMode = @@ -149,7 +149,7 @@ update flush state InitializeMode = showWindow flush matches <- getWordsInImage screenshot - let updatedSearchData = searchData {searchWords = matches, searchFilteredWords = matches} + let updatedSearchData = searchData {searchWords = matches, searchFilteredWords = matches, searchInputText = ""} pure (state {stateMode = ModeSearch updatedSearchData, stateIsModeInitialized = True}, Nothing) -- Set mode |
