diff options
| author | WormHeamer | 2026-01-02 01:08:32 -0500 |
|---|---|---|
| committer | WormHeamer | 2026-01-02 01:08:32 -0500 |
| commit | f5b3768e8a918d2a5dcb1c7e6828311c9742cb59 (patch) | |
| tree | 257604926aaa1ab13459a5efb75e45f091eb7f32 /main.c | |
| parent | 92d528ad2f406f85933c2a410594e9fc3da2c91e (diff) | |
show messages for search wrapped or not found
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -723,8 +723,10 @@ search_from_start:; if (match_found == 0) { match_found = -1; l = txt_start(l.t); + e.msg = S("wrapped"); goto search_from_start; } + e.msg = S("no match"); return 0; } @@ -768,8 +770,10 @@ search_from_end: match_found = -1; l = txt_end(l.t); end = start; + e.msg = S("wrapped"); goto search_from_end; } + e.msg = S("no match"); return 0; } @@ -951,16 +955,14 @@ repeat_char_search:; case '/': if (read_search()) { - TxtLoc r; - if (search_next_regex(l, e.search, &r)) l = r; + if (!search_next_regex(l, e.search, &l)) return 0; e.search_dir = 1; } break; case '?': if (read_search()) { - TxtLoc r; - if (search_prev_regex(l, e.search, &r)) l = r; + if (!search_prev_regex(l, e.search, &l)) return 0; e.search_dir = -1; } break; |
