The current implementation prefers feedkeys(..., 'i') and only falls back to :normal if Vim 7.4 does not have the 'i' flag and if Vim 7.3 supports :normal with count. For Vim 8.0 (and later), and also for versions between 7.0 and 7.3.99, feedkeys(..., 'i') is used. Due to the prepending action of the 'i' flag, keys must be submitted in reverse order; that's why s is submitted before r . cnt. Vim 7.0...7.3.99 ignore the 'i' flag, though, and append the keys, which are now in the wrong order (this only matters if a register or count is given).
This fix adds a separate conditional branch for Vim versions before 7.3.100 that uses feedkeys() in the correct order and omits the ignored 'i' flag.
The current implementation prefers
feedkeys(..., 'i')
and only falls back to:normal
if Vim 7.4 does not have the 'i' flag and if Vim 7.3 supports:normal
with count. For Vim 8.0 (and later), and also for versions between 7.0 and 7.3.99,feedkeys(..., 'i')
is used. Due to the prepending action of the 'i' flag, keys must be submitted in reverse order; that's whys
is submitted beforer . cnt
. Vim 7.0...7.3.99 ignore the 'i' flag, though, and append the keys, which are now in the wrong order (this only matters if a register or count is given).This fix adds a separate conditional branch for Vim versions before 7.3.100 that uses
feedkeys()
in the correct order and omits the ignored 'i' flag.