Changeset 09065ed for viewwin.c


Ignore:
Timestamp:
Oct 1, 2010, 9:22:21 PM (11 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
df4ccc0
Parents:
afaef6e
git-author:
David Benjamin <davidben@mit.edu> (09/30/10 20:19:46)
git-committer:
David Benjamin <davidben@mit.edu> (10/01/10 21:22:21)
Message:
If popless:start-search is passed "", continue search

Matches behavior with pressing / RET in both the recwin and less itself.

Reported-By: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • viewwin.c

    r118c919 r09065ed  
    173173static void owl_viewwin_callback_search(owl_editwin *e)
    174174{
     175  int consider_current = false;
    175176  const char *line = owl_editwin_get_text(e);
    176177  owl_viewwin_search_data *data = owl_editwin_get_cbdata(e);
    177   owl_function_set_search(line);
     178
     179  /* Given an empty string, just continue the current search. */
     180  if (line && *line) {
     181    owl_function_set_search(line);
     182    consider_current = true;
     183  }
    178184  if (!owl_viewwin_search(data->v, owl_global_get_search_re(&g),
    179                           true, data->direction))
     185                          consider_current, data->direction))
    180186    owl_function_error("No matches");
    181187}
Note: See TracChangeset for help on using the changeset viewer.