jline/jline2 — pull request #118 by jszakmeister (2013-12-24 14:38:53+00:00)
Title: Make history-search-backward/forward similar to readline's version.

This more closely matches the behavior you get with bash/readline.
There is currently a small difference: bash will move the cursor to the
end of the line when you haven't typed any characters and invoke
history-search-backward. Readline will then remember you haven't typed
anything and continue to do the equivalent of previous-history.

This version leaves the cursor at the beginning of the line since it
would require extra state to determine whether or not characters have
been input or the cursor has been moved manually since the last
history-search-backward/forward.

For those that have history-search-backward and history-search-forward
in their ~/.inputrc files, this more closely matches the expected
behavior.