Fix completion from the middle.

For example, `cla|ss` was completed to `class|ss`