Fix minor conditional issues in yank
This commit is contained in:
parent
a90662ef83
commit
47969362e1
@ -653,9 +653,11 @@ class CommandDispatcher:
|
|||||||
elif what == 'selection':
|
elif what == 'selection':
|
||||||
caret = self._current_widget().caret
|
caret = self._current_widget().caret
|
||||||
s = caret.selection()
|
s = caret.selection()
|
||||||
if not caret.has_selection() or len(s) == 0:
|
if not caret.has_selection() or not s:
|
||||||
message.info(self._win_id, "Nothing to yank")
|
message.info(self._win_id, "Nothing to yank")
|
||||||
return
|
return
|
||||||
|
else: # pragma: no cover
|
||||||
|
raise ValueError("Invalid value {!r} for `what'.".format(what))
|
||||||
|
|
||||||
if sel and utils.supports_selection():
|
if sel and utils.supports_selection():
|
||||||
target = "primary selection"
|
target = "primary selection"
|
||||||
|
Loading…
Reference in New Issue
Block a user