From 4decff67fba39ba2deb25890b1331a0b5fa8e57d Mon Sep 17 00:00:00 2001 From: Aaron Fischer Date: Tue, 22 Jan 2019 11:44:21 +0100 Subject: [PATCH] Rename Search to Find --- src/input.c | 8 ++++---- src/search.c | 6 +++--- src/search.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/input.c b/src/input.c index 91069c8..04332b7 100644 --- a/src/input.c +++ b/src/input.c @@ -7,7 +7,7 @@ #include "file.h" // for editorSave #include "fn.h" // for E, editorConfig, erow, CTRL_KEY, editorKey::AR... #include "output.h" // for editorSetStatusMessage, editorDelChar, editorI... -#include "search.h" // for editorFind +#include "search.h" // for editorSearch #include "terminal.h" // for editorReadKey @@ -93,7 +93,7 @@ void editorProcessKeypress() { int c = editorReadKey(); // Blocking! switch (c) { - case '\r': + case '\r': // ENTER if (wantToQuit == 0) { editorInsertNewLine(); } else { @@ -135,7 +135,7 @@ void editorProcessKeypress() { break; case CTRL_KEY('f'): - editorFind(); + editorSearch(); break; case BACKSPACE: @@ -167,7 +167,7 @@ void editorProcessKeypress() { break; case CTRL_KEY('l'): - case '\x1b': + case '\x1b': // ESC break; default: diff --git a/src/search.c b/src/search.c index 05c3a56..0e3cd13 100644 --- a/src/search.c +++ b/src/search.c @@ -6,7 +6,7 @@ #include "row.h" // for editorRowRxToCx -void editorFindCallback(char *query, int key) { +void editorSearchCallback(char *query, int key) { static int last_match = -1; static int direction = 1; @@ -58,13 +58,13 @@ void editorFindCallback(char *query, int key) { } } -void editorFind() { +void editorSearch() { int saved_cx = E.cx; int saved_cy = E.cy; int saved_coloff = E.coloff; int saved_rowoff = E.rowoff; - char *query = editorPrompt("Search: %s (Use ESC/Arrows/Enter)", editorFindCallback); + char *query = editorPrompt("Search: %s (Use ESC/Arrows/Enter)", editorSearchCallback); if (query) { free(query); } else { diff --git a/src/search.h b/src/search.h index 6f4f1fc..712b780 100644 --- a/src/search.h +++ b/src/search.h @@ -1,8 +1,8 @@ #ifndef _SEARCH_H_ #define _SEARCH_H_ -void editorFindCallback(char *query, int key); -void editorFind(); +void editorSearchCallback(char *query, int key); +void editorSearch(); #endif