Do not use prompt variable for other reason!

Use base_key instead.
DRY
Make sure do not move cursor with emulate_search_error
DFY search execution
Reduce nest with early return
Minor improvement for stay()
Fix stay mode with <expr>
Merge branch 'improve-readability' into dev

Including some fix