Fix unhandled SelectionUnsupportedError in :completion-item-yank

This commit is contained in:
Florian Bruhin 2020-06-11 22:20:17 +02:00
parent 049d51d1d7
commit f9bcda0147
2 changed files with 6 additions and 0 deletions

View File

@ -67,6 +67,8 @@ Fixed
- Crash when `tabs.focus_stack_size` is set to -1.
- Crash when a `pdf.js` file for PDF.js exists, but `viewer.html` does not.
- Crash when `:completion-item-yank --sel` is used on a platform without
primary selection support (e.g. Windows/macOS).
- `:config-write-py` now works with paths starting with `~/...` again.
- New site-specific quirk for a missing `globalThis` in Qt <= 5.12 on Reddit and Spotify

View File

@ -424,4 +424,8 @@ class CompletionView(QTreeView):
if not index.isValid():
raise cmdutils.CommandError("No item selected!")
text = self.model().data(index)
if not utils.supports_selection():
sel = False
utils.set_clipboard(text, selection=sel)