tFix reverse search, update TODO with missing keybind list - ve - a minimal text editor (work in progress)
 (HTM) git clone git://src.adamsgaard.dk/ve
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 808136c495310278d11336fd74be67cd09c43e57
 (DIR) parent 7b9298fa4a55f2d4c7fdfcddf3a34c01748f2819
 (HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
       Date:   Wed,  7 Aug 2019 16:12:46 +0200
       
       Fix reverse search, update TODO with missing keybind list
       
       Diffstat:
         M TODO                                |      15 ++++++++++++++-
         M find.c                              |       5 ++---
         M find.h                              |       2 ++
       
       3 files changed, 18 insertions(+), 4 deletions(-)
       ---
 (DIR) diff --git a/TODO b/TODO
       t@@ -2,7 +2,6 @@ Core functionality:
                - Proper handling of command-line arguments
                - Implement procedural keybinds
                - Implementing most Vi binds
       -        - Allow sending editor to background
                - Implement command mode
                - Allow call of commands with keybinds
                - Implement visual mode
       t@@ -14,6 +13,20 @@ Core functionality:
                - Hard-wrap (insert newline)
                - Soft-wrap (wrap display of long lines)
        
       +Normal mode keybinds:
       +        - }, {
       +        - zz, zt, zb
       +        - H, M, L
       +        - .
       +        - w, W
       +        - e, b
       +        - C-z
       +
       +Insert mode keybinds:
       +        - C-w
       +        - C-u
       +        - C-z
       +
        Interfacing:
                - Allow call of external processes with commands (sed?, sam?)
                - Allow IO pipes to external proceses
 (DIR) diff --git a/find.c b/find.c
       t@@ -59,13 +59,12 @@ editor_find_next_occurence(int opposite_direction)
        
                        if (y_inc == +1) {
                                match = strstr(row->chars + x_offset, E.find_query);
       -                        editor_set_status_message("'%s', x_offset=%d",
       -                                                  row->chars + x_offset, x_offset);
                                if (match)
                                        break;
                        } else {
                                match = strrstr(row->chars, E.find_query,
       -                                        row->size - x_offset, query_len);
       +                                        (y == E.cursor_y) ? E.cursor_x : row->size,
       +                                        query_len);
                                if (match)
                                        break;
                        }
 (DIR) diff --git a/find.h b/find.h
       t@@ -1,6 +1,8 @@
        #ifndef FIND_H_
        #define FIND_H_
        
       +char* strrstr(char *haystack, char *needle,
       +              ssize_t haystack_length, ssize_t needle_length);
        void editor_find_next_occurence(int opposite_direction);
        void editor_find(int direction);