Treat empty '/' as "find next"
authorJeff King <peff@peff.net>
Tue, 3 Feb 2009 05:49:08 +0000 (00:49 -0500)
committerJonas Fonseca <fonseca@diku.dk>
Tue, 3 Feb 2009 14:27:30 +0000 (15:27 +0100)
commit0b2667708c086c0b302d03f4143c6bd31c6144af
tree713c9724dad315bbd4e2f2a43f0c1c650d858d8a
parent43ef4ce9f457a1a7d7239122f5a43f836074d467
Treat empty '/' as "find next"

When the user requests a forward or backwards search, if
they provide no search string then we just abort the search.
However, many other programs (such as less and vi) treat
this as "repeat the last search", so users may have their
fingers trained to do this rather than use the explicit
"find next" feature.

This patch causes tig, if there was a previous search, to
find the next (or previous, if "?" was used) match in such a
case.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
tig.c