1 Increase the size of a literal search string to 8191
3 Also switch order of compares for upper and lower case
7 Modified to take into account new "official" buffer size of 5119
13 source/search.c | 8 ++++----
14 2 files changed, 5 insertions(+), 5 deletions(-)
16 diff --quilt old/source/nedit.h new/source/nedit.h
17 --- old/source/nedit.h
18 +++ new/source/nedit.h
20 #define NEDIT_DEFAULT_HELP_FG "black"
21 #define NEDIT_DEFAULT_HELP_BG "rgb:cc/cc/cc"
22 #define NEDIT_DEFAULT_CURSORLINE_BG "LightSteelBlue2"
24 /* Tuning parameters */
25 -#define SEARCHMAX 5119 /* Maximum length of search/replace strings */
26 +#define SEARCHMAX 8191 /* Maximum length of search/replace strings */
27 #define MAX_SEARCH_HISTORY 100 /* Maximum length of search string history */
28 #define MAX_PANES 6 /* Max # of ADDITIONAL text editing panes
29 that can be added to a window */
31 #define AUTOSAVE_CHAR_LIMIT 30 /* number of characters user can type before
32 diff --quilt old/source/search.c new/source/search.c
33 --- old/source/search.c
34 +++ new/source/search.c
35 @@ -4250,16 +4250,16 @@ static int searchLiteralWord(const char
36 /* This is critical code for the speed of searches. */
37 /* For efficiency, we define the macro DOSEARCH with the guts of the search */
38 /* routine and repeat it, changing the parameters of the outer loop for the */
39 /* searching, forwards, backwards, and before and after the begin point */
40 #define DOSEARCHWORD() \
41 - if (*filePtr == *ucString || *filePtr == *lcString) { \
42 + if (*filePtr == *lcString || *filePtr == *ucString) { \
43 /* matched first character */ \
47 - while (*tempPtr == *ucPtr || *tempPtr == *lcPtr) { \
48 + while (*tempPtr == *lcPtr || *tempPtr == *ucPtr) { \
49 tempPtr++; ucPtr++; lcPtr++; \
50 if ( *ucPtr == 0 /* matched whole string */ \
52 isspace((unsigned char)*tempPtr) ||\
53 strchr(delimiters, *tempPtr) ) \
54 @@ -4349,16 +4349,16 @@ static int searchLiteral(const char *str
55 /* This is critical code for the speed of searches. */
56 /* For efficiency, we define the macro DOSEARCH with the guts of the search */
57 /* routine and repeat it, changing the parameters of the outer loop for the */
58 /* searching, forwards, backwards, and before and after the begin point */
60 - if (*filePtr == *ucString || *filePtr == *lcString) { \
61 + if (*filePtr == *lcString || *filePtr == *ucString) { \
62 /* matched first character */ \
66 - while (*tempPtr == *ucPtr || *tempPtr == *lcPtr) { \
67 + while (*tempPtr == *lcPtr || *tempPtr == *ucPtr) { \
68 tempPtr++; ucPtr++; lcPtr++; \
70 /* matched whole string */ \
71 *startPos = filePtr - string; \
72 *endPos = tempPtr - string; \