Consider the following script:
    % cat > expr-feedkeys.vim <<EOF
    set nocompatible
    let g:n=0
    function FeedKeys()
        call feedkeys("i".g:n."\e")
        let g:n+=1
        return ""
    endfunction
    nnoremap <expr> a FeedKeys()
    nnoremap        b :call FeedKeys()<CR>
    EOF
    % vim -u NONE -S expr-feedkeys.vim -s <(echo 'ab:wq! text')
This will create file `text' that contains the only character `1' (and NL, of 
course), while expected to have two characters: `0' and `1'. Tested on 
vim-7.3.102 (from Gentoo repos) and vim-7.3.138 (mercurial rev ea399ac2c1b9).

By the way, after vim exits I get «0;115;0c» in my command line. It is probably 
a bug somewhere too, though not sure in vim or in zsh.

Attachment: signature.asc
Description: This is a digitally signed message part.

Raspunde prin e-mail lui