diff options
Diffstat (limited to '')
-rw-r--r-- | src/conf.c | 5 | ||||
-rw-r--r-- | src/options.h | 1 | ||||
-rw-r--r-- | src/screen_utils.c | 3 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/conf.c b/src/conf.c index 73135b8f6..4b5e49230 100644 --- a/src/conf.c +++ b/src/conf.c @@ -54,6 +54,7 @@ #define CONF_XTERM_TITLE_FORMAT "xterm-title-format" #define CONF_LIST_WRAP "wrap-around" #define CONF_FIND_WRAP "find-wrap" +#define CONF_FIND_SHOW_LAST "find-show-last" #define CONF_AUDIBLE_BELL "audible-bell" #define CONF_VISIBLE_BELL "visible-bell" #define CONF_XTERM_TITLE "set-xterm-title" @@ -490,6 +491,10 @@ read_rc_file(char *filename, options_t *options) { options->find_wrap = str2bool(value); } + else if( !strcasecmp(CONF_FIND_SHOW_LAST,name) ) + { + options->find_show_last_pattern = str2bool(value); + } else if( !strcasecmp(CONF_AUDIBLE_BELL, name) ) { options->audible_bell = str2bool(value); diff --git a/src/options.h b/src/options.h index 6acf88b09..10aba1441 100644 --- a/src/options.h +++ b/src/options.h @@ -21,6 +21,7 @@ typedef struct gboolean reconnect; gboolean debug; gboolean find_wrap; + gboolean find_show_last_pattern; gboolean list_wrap; gboolean auto_center; gboolean wide_cursor; diff --git a/src/screen_utils.c b/src/screen_utils.c index 09ce85787..86b779245 100644 --- a/src/screen_utils.c +++ b/src/screen_utils.c @@ -116,6 +116,7 @@ screen_find(screen_t *screen, int reversed = 0; int retval = 0; char *prompt = FIND_PROMPT; + char *value = options.find_show_last_pattern ? (char *) -1 : NULL; if( findcmd==CMD_LIST_RFIND ||findcmd==CMD_LIST_RFIND_NEXT ) { @@ -138,7 +139,7 @@ screen_find(screen_t *screen, if( !screen->findbuf ) screen->findbuf=screen_readln(screen->status_window.w, prompt, - (char *) -1, //NULL, + value, &screen->find_history, NULL); if( !screen->findbuf || !screen->findbuf[0] ) |