mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-02 01:17:15 +03:00
treat search_last_line as a boolean everywhere, and remove some unneeded
trailing spaces git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1768 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
8328fc2439
commit
c372488179
@ -119,7 +119,7 @@ void update_color(void)
|
|||||||
|
|
||||||
/* if we haven't found a match, use the override string */
|
/* if we haven't found a match, use the override string */
|
||||||
if (colorstrings == NULL && syntaxstr != NULL) {
|
if (colorstrings == NULL && syntaxstr != NULL) {
|
||||||
for (tmpsyntax = syntaxes; tmpsyntax != NULL;
|
for (tmpsyntax = syntaxes; tmpsyntax != NULL;
|
||||||
tmpsyntax = tmpsyntax->next) {
|
tmpsyntax = tmpsyntax->next) {
|
||||||
if (!strcasecmp(tmpsyntax->desc, syntaxstr))
|
if (!strcasecmp(tmpsyntax->desc, syntaxstr))
|
||||||
colorstrings = tmpsyntax->color;
|
colorstrings = tmpsyntax->color;
|
||||||
|
@ -2661,7 +2661,7 @@ char *do_browser(const char *inpath)
|
|||||||
case NANO_PREVPAGE_FKEY:
|
case NANO_PREVPAGE_FKEY:
|
||||||
case '-': /* Pico compatibility */
|
case '-': /* Pico compatibility */
|
||||||
if (selected >= (editwinrows + lineno % editwinrows) * width)
|
if (selected >= (editwinrows + lineno % editwinrows) * width)
|
||||||
selected -= (editwinrows + lineno % editwinrows) * width;
|
selected -= (editwinrows + lineno % editwinrows) * width;
|
||||||
else
|
else
|
||||||
selected = 0;
|
selected = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -114,10 +114,10 @@ extern const shortcut *currshortcut;
|
|||||||
|
|
||||||
#ifdef HAVE_REGEX_H
|
#ifdef HAVE_REGEX_H
|
||||||
extern regex_t search_regexp;
|
extern regex_t search_regexp;
|
||||||
extern regmatch_t regmatches[10];
|
extern regmatch_t regmatches[10];
|
||||||
#ifdef ENABLE_COLOR
|
#ifdef ENABLE_COLOR
|
||||||
extern regex_t syntaxfile_regexp;
|
extern regex_t syntaxfile_regexp;
|
||||||
extern regmatch_t synfilematches[1];
|
extern regmatch_t synfilematches[1];
|
||||||
#endif /* ENABLE_COLOR */
|
#endif /* ENABLE_COLOR */
|
||||||
#endif /* HAVE_REGEX_H */
|
#endif /* HAVE_REGEX_H */
|
||||||
|
|
||||||
@ -412,7 +412,7 @@ char *get_history_newer(historyheadtype *h);
|
|||||||
char *get_history_completion(historyheadtype *h, char *s);
|
char *get_history_completion(historyheadtype *h, char *s);
|
||||||
void free_history(historyheadtype *h);
|
void free_history(historyheadtype *h);
|
||||||
#ifdef ENABLE_NANORC
|
#ifdef ENABLE_NANORC
|
||||||
void load_history(void);
|
void load_history(void);
|
||||||
void save_history(void);
|
void save_history(void);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -318,7 +318,7 @@ int findnextstr(int can_display_wrap, int wholeword, const filestruct
|
|||||||
|
|
||||||
/* Original start line reached. */
|
/* Original start line reached. */
|
||||||
if (fileptr == begin)
|
if (fileptr == begin)
|
||||||
search_last_line = 1;
|
search_last_line = TRUE;
|
||||||
rev_start = fileptr->data;
|
rev_start = fileptr->data;
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
if (ISSET(REVERSE_SEARCH))
|
if (ISSET(REVERSE_SEARCH))
|
||||||
@ -389,7 +389,7 @@ int do_search(void)
|
|||||||
update_history(&search_history, answer);
|
update_history(&search_history, answer);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
search_last_line = 0;
|
search_last_line = FALSE;
|
||||||
didfind = findnextstr(TRUE, FALSE, current, current_x, answer, FALSE);
|
didfind = findnextstr(TRUE, FALSE, current, current_x, answer, FALSE);
|
||||||
edit_refresh();
|
edit_refresh();
|
||||||
placewewant = xplustabs();
|
placewewant = xplustabs();
|
||||||
@ -440,7 +440,7 @@ int do_research(void)
|
|||||||
return -1;
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
search_last_line = 0;
|
search_last_line = FALSE;
|
||||||
didfind = findnextstr(TRUE, FALSE, current, current_x, last_search, FALSE);
|
didfind = findnextstr(TRUE, FALSE, current, current_x, last_search, FALSE);
|
||||||
edit_refresh();
|
edit_refresh();
|
||||||
placewewant = xplustabs();
|
placewewant = xplustabs();
|
||||||
@ -926,7 +926,7 @@ int do_find_bracket(void)
|
|||||||
/* We constructed regexp_pat to be a valid expression. */
|
/* We constructed regexp_pat to be a valid expression. */
|
||||||
assert(regexp_compiled);
|
assert(regexp_compiled);
|
||||||
|
|
||||||
search_last_line = 0;
|
search_last_line = FALSE;
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
if (findnextstr(FALSE, FALSE, current, current_x, regexp_pat, FALSE) != 0) {
|
if (findnextstr(FALSE, FALSE, current, current_x, regexp_pat, FALSE) != 0) {
|
||||||
/* Found identical bracket. */
|
/* Found identical bracket. */
|
||||||
|
Loading…
Reference in New Issue
Block a user