Fixes behavior of 'x' in normal mode

After 'x' is used to delete a character at the end of a line the cursor
should be repositioned at the last character, i.e. repeatedly pressing
'x' in normal mode should delete the entire string.
This commit is contained in:
Michael Steinert
2016-11-30 14:28:43 -06:00
committed by Kurtis Rader
parent 1fbcb1ee9d
commit e2ed561264
3 changed files with 16 additions and 0 deletions

View File

@@ -92,6 +92,18 @@ expect_prompt -re {\r\nTAXT\r\n} {
puts stderr "vi mode replace char, default timeout: long delay"
}
# Test deleting characters with 'x'.
send "echo MORE-TEXT"
send "\033"
# Delay needed to allow fish to transition to vi "normal" mode.
sleep 0.150
send "xxxxx\r"
expect_prompt -re {\r\nMORE\r\n} {
puts "vi mode delete char, default timeout: long delay"
} unmatched {
puts stderr "vi mode delete char, default timeout: long delay"
}
# Verify that changing the escape timeout has an effect.
send "set -g fish_escape_delay_ms 200\r"
expect_prompt