On 10/22/06, Bram Moolenaar <[EMAIL PROTECTED]> wrote:
Yakov Lerner wrote: > cnoremap <expr><enter> (getcmdtype()=='/' ? "\n:redraw" : "\n") > > I am intercepring the <enter> in the /pattern search. > > When search is found, it works. E.g., type /.<enter>, and you see :redraw > as a sign that mapping worked. > > But when search was not found, this mapping does not work. > Why ? Type /xyzxyz<enter>, and :redraw does not appear. Why ? The "\n" that executes the search will result in an error. This error will clear the typeahead, thus ":redraw" is gone.
Thanks Yakov
