Bram,
consider this:
cat /tmp/dict
catharsis
catechism
catastrophe
vim -u NONE -N -c 'set cpt=k,. dictionary=/tmp/dict'
$put ='canz'
$put ='canq'
0put ='ca'
Got to the end of the first line, and press <C-N>
Note, how Vim hangs. This happens, because in the function
ins_compl_get_exp() in edit.c:4406 Vim will start an endless loop,
because the search wraps and it will keep finding matches and not
terminate the loop.
Attached patch fixes this.
This behaviour was mentioned at
http://stackoverflow.com/questions/20968671
Best,
Christian
--