clipboard kitten: Fix a bug causing the last MIME type available on the clipboard not being recognized when pasting with arbitrary MIME types

This commit is contained in:
Kovid Goyal 2023-04-30 06:48:09 +05:30
parent 59c4d4a4bd
commit 73f10aaf43
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 1 deletions

View File

@ -40,6 +40,8 @@ Detailed list of changes
- unicode_input kitten: Fix a regression in 0.28.0 that caused the order of recent and favorites entries to not be respected (:iss:`6214`) - unicode_input kitten: Fix a regression in 0.28.0 that caused the order of recent and favorites entries to not be respected (:iss:`6214`)
- clipboard kitten: Fix a bug causing the last MIME type available on the clipboard not being recognized when pasting
0.28.1 [2023-04-21] 0.28.1 [2023-04-21]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -343,7 +343,7 @@ func run_get_loop(opts *Options, args []string) (err error) {
if reading_available_mimes { if reading_available_mimes {
switch metadata["status"] { switch metadata["status"] {
case "DATA": case "DATA":
available_mimes = strings.Split(utils.UnsafeBytesToString(payload), " ") available_mimes = utils.Map(strings.TrimSpace, strings.Split(utils.UnsafeBytesToString(payload), " "))
case "OK": case "OK":
case "DONE": case "DONE":
reading_available_mimes = false reading_available_mimes = false