Import of r39710 from trunk. History line count differs when adding the history line outside TextInput. Update history line index of ^O to reflect that.
Changed paths: