Fix search binding regression introduced in 1be1228
commit35e3058654483c4853fc300b5dc12d61846a8fc2
authorJonas Fonseca <jonas.fonseca@gmail.com>
Sun, 7 Aug 2016 03:49:55 +0000 (6 23:49 -0400)
committerJonas Fonseca <jonas.fonseca@gmail.com>
Sun, 7 Aug 2016 03:51:19 +0000 (6 23:51 -0400)
tree96ea69cd71b2e1e501bf595ca1126257e173d790
parent936bf08695ccfc2fdc0fb8ccfa9f6e737c89a142
Fix search binding regression introduced in 1be1228

From the ticket:

    After 1be1228, when a previous search pattern exists, :/ and :? do
    not set a new search pattern, and thus function like n and N. This
    breaks search bindings since they must use :/ and :? instead of /
    and ? (which still work). For example, the default bind diff @ :/^@@
    does not work correctly following a search for a different pattern.

    To reproduce: Search /foo and then search :/bar (note :/, not /),
    for any distinct foo and bar.

This is fixed by ensuring that the search is reset when
`view->env->search` is updated by the prompt code.

Fixes #476
src/search.c