Fix text with empty primary selection

This commit is contained in:
Florian Bruhin 2017-03-29 11:31:05 +02:00
parent 4d49d9da09
commit 708b46d6c0
2 changed files with 9 additions and 0 deletions

View File

@ -54,6 +54,10 @@ class SelectionUnsupportedError(ClipboardError):
"""Raised if [gs]et_clipboard is used and selection=True is unsupported."""
def __init__(self):
super().__init__("Primary selection is not supported on this "
"platform!")
class ClipboardEmptyError(ClipboardError):

View File

@ -99,6 +99,11 @@ Feature: Yanking and pasting.
And I run :open {primary} (invalid command)
Then the error "Primary selection is empty." should be shown
Scenario: Pasting without primary selection being supported
When selection is not supported
And I run :open {primary} (invalid command)
Then the error "Primary selection is not supported on this platform!" should be shown
Scenario: Pasting with a space in clipboard
When I put " " into the clipboard
And I run :open {clipboard} (invalid command)