From 4768b16b7409dd6ef8467037e46d60fd0c722d8c Mon Sep 17 00:00:00 2001 From: Sam Lanning Date: Sun, 6 Nov 2022 07:34:14 +0000 Subject: Add setting for keeping typed query when exiting (#451) * Add option for keeping typed query on escape fixes #422 * chore: Address duplicate if statement blocks --- docs/config.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 13aabac2..9039e094 100644 --- a/docs/config.md +++ b/docs/config.md @@ -143,6 +143,21 @@ Filter modes can still be toggled via ctrl-r search_mode = "fulltext" ``` +### `exit_mode` + +What to do when the escape key is pressed when searching + +| Value | Behaviour | +|------------------------- | --------------- | +| return-original (default) | Set the command-line to the value it had before starting search | +| return-query | Set the command-line to the search query you have entered so far | + +Pressing ctrl+c or ctrl+d will always return the original command-line value. + +``` +exit_mode = "return-query" +``` + #### `fuzzy` search syntax The "fuzzy" search syntax is based on the -- cgit v1.3.1