From 8839215b9901ab51cdb1e2c9bafab6e38f3c0513 Mon Sep 17 00:00:00 2001 From: Shuanglei Tao Date: Tue, 23 Jan 2024 09:34:00 +0800 Subject: [PATCH] support \r in line breaks --- lua/dialog.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/dialog.lua b/lua/dialog.lua index 238c224..6988d31 100644 --- a/lua/dialog.lua +++ b/lua/dialog.lua @@ -70,7 +70,7 @@ end local function clipboard_cb(clipboard) mp.osd_message('clipboard: ' .. clipboard) local i = 1 - for line in string.gmatch(clipboard, '[^\n]+') do + for line in string.gmatch(clipboard, '[^\r\n]+') do open_file(i, line, open_action) i = i + 1 end