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
2 changed files with 3 additions and 1 deletions

View File

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