I'm trying to make Vim play nice with wrapped lines and I'm running into some problems. The following line
xnoremap <expr> k ((v:count == 0) || (mode() !=# "V") ? 'gk' : 'k')
gives me the following error when launching Vim
Error detected while processing /cygdrive/c/Users/Chad/.vimrc:
line 76:
E749: empty buffer
If I remove either of the conditions the map will work fine but I'd like to combine them. Any ideas? Thanks in advance.