Skip to content

Commit e6a11d4

Browse files
64-bitmanchrisbra
authored andcommitted
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 <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 2006415 commit e6a11d4

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

runtime/pack/dist/opt/osc52/autoload/osc52.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ enddef
1212
var sent_message: bool = false
1313

1414
def OSCMessage(id: number)
15-
echom "Waiting for OSC52 response... Press CTRL-C to cancel"
15+
echo "Waiting for OSC52 response... Press CTRL-C to cancel"
1616
sent_message = true
1717
enddef
1818

1919
export def Paste(reg: string): tuple<string, list<string>>
2020
# Check if user has indicated that the terminal does not support OSC 52 paste
2121
# (or has disabled it)
2222
if get(g:, 'osc52_disable_paste', 0)
23-
return ("c", [""])
23+
return ("c", [])
2424
endif
2525

2626
# Some terminals like Kitty respect the selection type parameter on both X11

src/testdir/dumps/Test_osc52_paste_01.dump

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
|~| @73
1818
|~| @73
1919
|~| @73
20-
|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|
20+
|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|

0 commit comments

Comments
 (0)