[vim/vim] `^[[[O` `^[[[I` appeared while using `wl_clipboard` (Issue #21217)

3 views
Skip to first unread message

Mao-Yining

unread,
Sep 4, 2026, 1:12:00 AM (yesterday) Sep 4
to vim/vim, Subscribed
mao-yining created an issue (vim/vim#21217)

### Steps to reproduce

```vim
vim9script

def Available(): bool
return executable('wl-copy') && executable('wl-paste')
enddef

def Copy(reg: string, type: string, str: list<string>)
var args = "wl-copy"

if reg == "*"
args ..= " -p"
endif

system(args, str)
enddef

def Paste(reg: string): tuple<string, list<string>>
var args = "wl-paste --type text/plain;charset=utf-8"

if reg == "*"
args ..= " -p"
endif

return ("", systemlist(args))
enddef

v:clipproviders["wl_clipboard"] = {
available: Available,
copy: {
"+": Copy,
"*": Copy
},
paste: {
"+": Paste,
"*": Paste
}
}

set clipmethod=wl_clipboard
```
Ghost `^[[[O` `^[[[I` appear.

https://github.com/user-attachments/assets/7d3d5ca0-a64e-43f2-b0b3-127167b8ba7e

### Expected behaviour

Éric NICOLAS

unread,
Sep 4, 2026, 5:26:37 AM (20 hours ago) Sep 4
to vim/vim, Subscribed
ccjmne left a comment (vim/vim#21217)

Just providing additional information purely for context.

It's not quite ^[[[I and ^[[[O you're seeing, but rather ^[[I and ^[[O.

They're CSI escape sequences, albeit not ANSI ones, but well-established ones (de-facto standard) from DEC:
When you enable focus reporting within a terminal (emulator), you will receive CSI I (that is, ^[[I) whenever your terminal and/or running process gets focused IN, and CSI O (that is, ^[[O) when your running process or terminal loses the focus.

We could indeed avoid printing it in some edge cases! I've encountered it before doing something else as well.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21217/5538421354@github.com>

dezza

unread,
Sep 4, 2026, 3:57:51 PM (10 hours ago) Sep 4
to vim/vim, Subscribed
dezza left a comment (vim/vim#21217)

is there any reason you're using wl-copy and wl-paste directly instead of the builtin integration?

I encounter these also while using ghostty and calling external commands but haven't collected enough yet to come to a conclusion, it could be a regression in term.c


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21217/5545773492@github.com>

Mao-Yining

unread,
1:12 AM (1 hour ago) 1:12 AM
to vim/vim, Subscribed
mao-yining left a comment (vim/vim#21217)

is there any reason you're using wl-copy and wl-paste directly instead of the builtin integration?

Gnome don't support ext_data_control|zwlr_data_control. So I can't use clipboard in TUI. What's more if compiled vim with gtk4. xterm_clipboard is forbidden.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21217/5549562592@github.com>

Reply all
Reply to author
Forward
0 new messages