From: Foxe Chen Date: Fri, 26 Dec 2025 14:59:01 +0000 (+0000) Subject: runtime(osc52): A few minor fixes X-Git-Url: https://git.feebdaed.xyz/?a=commitdiff_plain;h=e6a11d45e5b954e4ef8f85cede73c1d8b5f3d77d;p=0xmirror%2Fvim.git runtime(osc52): A few minor fixes - If g:osc52_disable_paste is enabled, then return an empty list instead of a list with a single empty string. - use `echo` instead of `echom` when printing osc waiting message closes: #19002 Signed-off-by: Foxe Chen Signed-off-by: Christian Brabandt --- diff --git a/runtime/pack/dist/opt/osc52/autoload/osc52.vim b/runtime/pack/dist/opt/osc52/autoload/osc52.vim index 28c49accf..3471329d7 100644 --- a/runtime/pack/dist/opt/osc52/autoload/osc52.vim +++ b/runtime/pack/dist/opt/osc52/autoload/osc52.vim @@ -12,7 +12,7 @@ enddef var sent_message: bool = false def OSCMessage(id: number) - echom "Waiting for OSC52 response... Press CTRL-C to cancel" + echo "Waiting for OSC52 response... Press CTRL-C to cancel" sent_message = true enddef @@ -20,7 +20,7 @@ export def Paste(reg: string): tuple> # Check if user has indicated that the terminal does not support OSC 52 paste # (or has disabled it) if get(g:, 'osc52_disable_paste', 0) - return ("c", [""]) + return ("c", []) endif # Some terminals like Kitty respect the selection type parameter on both X11 diff --git a/src/testdir/dumps/Test_osc52_paste_01.dump b/src/testdir/dumps/Test_osc52_paste_01.dump index c0c562802..636b26fd2 100644 --- a/src/testdir/dumps/Test_osc52_paste_01.dump +++ b/src/testdir/dumps/Test_osc52_paste_01.dump @@ -17,4 +17,4 @@ |~| @73 |~| @73 |~| @73 -|W+0#0000000&|a|i|t|i|n|g| |f|o|r| |O|S|C|5|2| |r|e|s|.@2|P|r|e|s@1| |C|T|R|L|-|C| |t|o| |c|a|n|c|e|l| @10|0|,|0|-|1| @8|A|l@1| +|W+0#0000000&|a|i|t|i|n|g| |f|o|r| |O|S|C|5|2| |r|e|s|p|o|n|s|e|.@2| |P|r|e|s@1| |C|T|R|L|-|C| |t|o| |c|a|n|c|e|l| @4|0|,|0|-|1| @8|A|l@1|