fix(term): copy_selection() when nothing selected

Fixes the copy_selection() method so that it returns and empty string
when called and nothing is selected. Previously printed an error.
This commit is contained in:
Leroy Hopson 2024-04-28 15:25:26 +12:00 committed by Leroy Hopson
parent 3ca272c615
commit 43303a51bf
2 changed files with 8 additions and 3 deletions

View file

@ -222,6 +222,9 @@ class TestCopy:
subject.write(text)
assert_string_contains(subject.copy_all(), text)
func test_copy_selection_when_nothing_selected():
assert_eq(subject.copy_selection(), "")
class TestClear:
extends TerminalTest