editable_line: guard against empty text

there's got to be a nicer way to do this

Fixes #11324
This commit is contained in:
Fabian Boehm
2025-03-26 19:20:00 +01:00
parent 360cfdb7ae
commit 89b62a56e1
2 changed files with 26 additions and 7 deletions

View File

@@ -184,3 +184,8 @@ sendline(r"""abbr fruit --command={git,hg,svn,} banana""")
expect_prompt()
sendline(r"""fruit foo""")
expect_prompt("I am a banana")
# (don't add the literal string "bar" here or the expect_prompt will match it - so we add some no-op quotes)
sendline(r"""function replace; commandline -r ""; echo echo b''ar; end; abbr foo --function replace""")
sendline("foo")
expect_prompt("bar")