nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit ee57cbfa6634eb405ec365734055744c32cf06eb
parent bd1fcc5fe20912221e220795d1bdce6e6d13d7b4
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Sat,  6 Aug 2016 14:39:08 +0200

debug: add a timing instrument to the main search routine

Diffstat:
Msrc/search.c | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/search.c b/src/search.c @@ -494,6 +494,9 @@ void go_looking(void) filestruct *was_current = openfile->current; size_t was_current_x = openfile->current_x; int didfind; +#ifdef DEBUG + clock_t start = clock(); +#endif came_full_circle = FALSE; @@ -509,6 +512,10 @@ void go_looking(void) openfile->current_x == was_current_x) statusbar(_("This is the only occurrence")); +#ifdef DEBUG + statusline(HUSH, "Took: %.2f", (double)(clock() - start) / CLOCKS_PER_SEC); +#endif + edit_redraw(was_current); search_replace_abort(); }