Use self-insert-notfirst on spaces during paste

This changes a5a643f854 to use the new self-insert-notfirst binding.
It also adds a test.
This commit is contained in:
ridiculousfish
2020-03-04 14:28:22 -08:00
parent b8a7cdacb6
commit 29c2bce704
3 changed files with 14 additions and 1 deletions

View File

@@ -299,3 +299,15 @@ expect_prompt -re {nul seen\r\nnul seen\r\nnul seen} {
} unmatched {
puts stderr "nul not seen"
}
# Test self-insert-notfirst. (#6603)
# Here the leading 'q's should be stripped, but the trailing ones not.
send "bind q self-insert-notfirst\r"
expect_prompt
send "qqqecho qqq"
send "\r"
expect_prompt -re {qqq} {
puts "Leading q properly stripped"
} unmatched {
puts stderr "Leading qs not stripped"
}

View File

@@ -23,3 +23,4 @@ ctrl-o seen
ctrl-w stops at :
ctrl-w stops at @
nul seen
Leading q properly stripped