Fix cursor position after completion tail restore
The try to fix vi-mode completion introduced a cursor position bug when the tail is restored. The cursor is now properly restored to just before the tail.
The try to fix vi-mode completion introduced a cursor position bug when the tail is restored. The cursor is now properly restored to just before the tail.