diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-12-28 14:13:47 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-12-28 14:15:10 +0530 |
| commit | 9a5453aa190834b01e78cd971c445f1f0e34ee41 (patch) | |
| tree | f1b3f99b34f3f508bb98ac527f7b5d51f2b69dcf /src/Chelleport/View.hs | |
| parent | d6dbe32df6f1a01c95f9293023e2d73872fa39fe (diff) | |
| download | chelleport-9a5453aa190834b01e78cd971c445f1f0e34ee41.tar.gz chelleport-9a5453aa190834b01e78cd971c445f1f0e34ee41.zip | |
Add update flushing to allow showing loading state after showing window
Diffstat (limited to 'src/Chelleport/View.hs')
| -rw-r--r-- | src/Chelleport/View.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Chelleport/View.hs b/src/Chelleport/View.hs index 202c636..790b3f7 100644 --- a/src/Chelleport/View.hs +++ b/src/Chelleport/View.hs @@ -19,8 +19,11 @@ getSearchText :: State -> String getSearchText state = case stateMode state of ModeHints -> "" ModeSearch {searchInputText, searchFilteredWords, searchHighlightedIndex} -> - "Searching (" ++ matchCount ++ "): " ++ searchInputText + searchText where + searchText + | stateIsModeInitialized state = "Searching (" ++ matchCount ++ "): " ++ searchInputText + | otherwise = "Loading..." matchCount | isEmpty searchFilteredWords = "0/0" | otherwise = show (searchHighlightedIndex + 1) ++ "/" ++ show (length searchFilteredWords) |
