Repository: alacritty/alacritty (language: rust)

Issue:
Running vim with TERM=xterm triggers paste at startup
When using TERM=`xterm` (also `xterm-256color` or `rxvt`), starting vim within Alacritty causes it to paste the contents of its default "yank" register at startup.

This behavior was introduced in 0589b718 (DECRPM/DECRQM support) and it seems to be triggered by running `report_private_mode` for `NamedPrivateMode::BlinkingCursor`.  If I add a `return` [here](https://github.com/alacritty/alacritty/blob/5adfc4fb00d1b523bd17bbd73515d30636de0a0e/alacritty_terminal/src/term/mod.rs#L1888) to disable that single mode, the problem is no longer visible.

I don't think the "paste" effect is related to Alacritty - it seems to be caused by the escape code sending a `p` character and triggering Vim's native paste function.

The problem does not happen when using TERM=`alacritty`.  I can also work around it by adding `set t_RV=` to my `.vimrc`.

### System

OS: Linux, Fedora 39, Wayland + sway
Version: alacritty 0.13.0-dev (5adfc4fb)
vim: `vim-enhanced-9.0.2120-1.fc39.x86_64`, version `VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Nov 22 2023 00:00:00)
Included patches: 1-2120`, no `.vimrc` or Vim scripts installed

### Logs

<details>
<summary>`alacritty --print-events -vvv`</summary>
<pre>
[0.000011001s] [INFO ] [alacritty] Welcome to Alacritty
[0.000073520s] [INFO ] [alacritty] Version 0.13.0-dev (5adfc4fb)
[0.000083699s] [INFO ] [alacritty] Running on Wayland
[0.001041483s] [INFO ] [alacritty] Configuration files loaded from:
                                     "/home/mark/.config/alacritty/alacritty.toml"
[0.001344690s] [INFO ] [alacritty] winit event: NewEvents(Init)
[0.001359709s] [INFO ] [alacritty] winit event: Resumed
[0.013034949s] [INFO ] [alacritty] Using EGL 1.5
[0.013077610s] [DEBUG] [alacritty] Picked GL Config:
                                     buffer_type: Some(Rgb { r_size: 8, g_size: 8, b_size: 8 })
                                     alpha_size: 8
                                     num_samples: 0
                                     hardware_accelerated: true
                                     supports_transparency: Some(true)
                                     config_api: Api(OPENGL | GLES1 | GLES2 | GLES3)
                                     srgb_capable: true
[0.019888308s] [INFO ] [alacritty] Window scale factor: 1
[0.023789666s] [DEBUG] [alacritty] Loading "Monaspace Krypton" font
[0.034054872s] [TRACE] [crossfont] Number of fonts is 78
[0.034085650s] [TRACE] [crossfont] Got font path="/home/mark/.local/share/fonts/MonaspaceKrypton-Medium.otf", index=0
[0.034160012s] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Medium, load_flags: TARGET_LIGHT, render_mode: "Normal", lcd_filter: 1 }
[0.036077884s] [TRACE] [crossfont] Number of fonts is 77
[0.036102200s] [TRACE] [crossfont] Got font path="/home/mark/.local/share/fonts/MonaspaceKrypton-ExtraBold.otf", index=0
[0.036152295s] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: ExtraBold, load_flags: TARGET_LIGHT, render_mode: "Normal", lcd_filter: 1 }
[0.037999493s] [TRACE] [crossfont] Number of fonts is 81
[0.038025111s] [TRACE] [crossfont] Got font path="/home/mark/.local/share/fonts/MonaspaceKrypton-Italic.otf", index=0
[0.038077351s] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Italic, load_flags: TARGET_LIGHT, render_mode: "Normal", lcd_filter: 1 }
[0.039953613s] [TRACE] [crossfont] Number of fonts is 81
[0.039976106s] [TRACE] [crossfont] Got font path="/home/mark/.local/share/fonts/MonaspaceKrypton-BoldItalic.otf", index=0
[0.040027975s] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Bold Italic, load_flags: TARGET_LIGHT, render_mode: "Normal", lcd_filter: 1 }
[0.063213712s] [INFO ] [alacritty] Running on NVIDIA T1000 8GB/PCIe/SSE2
[0.063229843s] [INFO ] [alacritty] OpenGL version 3.3.0 NVIDIA 535.129.03, shader_version 3.30 NVIDIA via Cg compiler
[0.063241515s] [INFO ] [alacritty] Using OpenGL 3.3 renderer
[0.065284304s] [DEBUG] [alacritty] Enabled debug logging for OpenGL
[0.065300475s] [DEBUG] [alacritty] Filling glyph cache with common glyphs
[0.067956833s] [INFO ] [alacritty] Cell size: 9 x 17
[0.067971120s] [INFO ] [alacritty] Padding: 2 x 4
[0.067978554s] [INFO ] [alacritty] Width: 800, Height: 600
[0.068103582s] [TRACE] [alacritty] Deriving dim colors from normal colors
[0.068131455s] [INFO ] [alacritty] PTY dimensions: 34 x 88
[0.070240641s] [INFO ] [alacritty] Initialisation complete
[0.070269326s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: Resized(PhysicalSize { width: 800, height: 600 }) }
[0.070290236s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: RedrawRequested }
[0.071294658s] [DEBUG] [alacritty] [gl_render] Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (3), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (4), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations.
[0.074929539s] [INFO ] [alacritty] winit event: AboutToWait
[0.074987159s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356164, tv_nsec: 658480640 }, requested_resume: None })
[0.075007408s] [INFO ] [alacritty] winit event: AboutToWait
[0.089908550s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356164, tv_nsec: 658548769 }, requested_resume: None })
[0.089935952s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: Resized(PhysicalSize { width: 956, height: 582 }) }
[0.089955479s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: Focused(true) }
[0.089969696s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: ModifiersChanged(Modifiers { state: ModifiersState(0x0), pressed_mods: ModifiersKeys(0x0) }) }
[0.089989735s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: RedrawRequested }
[0.090020964s] [DEBUG] [alacritty_terminal] New num_cols is 105 and num_lines is 33
[0.091533404s] [INFO ] [alacritty] Padding: 2 x 4
[0.091549304s] [INFO ] [alacritty] Width: 956, Height: 582
[0.093220556s] [INFO ] [alacritty] winit event: AboutToWait
[0.097553677s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356164, tv_nsec: 676769933 }, requested_resume: None })
[0.097571220s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: CursorEntered { device_id: DeviceId(Wayland(DeviceId)) } }
[0.097580698s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: CursorMoved { device_id: DeviceId(Wayland(DeviceId)), position: PhysicalPosition { x: 504.8828125, y: 388.15234375 } } }
[0.097593072s] [INFO ] [alacritty] winit event: AboutToWait
[0.119807439s] [TRACE] [alacritty_terminal] Setting title to 'Some("mark@c3p-214:~/src/alacritty")'
[0.119884937s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356164, tv_nsec: 683368107 }, requested_resume: None })
[0.119905245s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(94409532888736))), payload: Terminal(Title(mark@c3p-214:~/src/alacritty)) })
[0.119919132s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(94409532888736))), payload: Terminal(Wakeup) })
[0.119937667s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: RedrawRequested }
[0.119947245s] [TRACE] [alacritty_terminal] Setting private mode: BracketedPaste
[0.119962705s] [TRACE] [alacritty_terminal] Setting attribute: Foreground(Named(Green))
[0.119977753s] [TRACE] [alacritty_terminal] Setting attribute: Reset
[0.119986540s] [TRACE] [alacritty_terminal] Setting attribute: Foreground(Named(Green))
[0.119996689s] [TRACE] [alacritty_terminal] Setting attribute: Reset
[0.120004885s] [TRACE] [alacritty_terminal] Setting attribute: Reset
[0.121483681s] [INFO ] [alacritty] winit event: AboutToWait
[0.121526843s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356164, tv_nsec: 705032877 }, requested_resume: None })
[0.121538054s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(94409532888736))), payload: Terminal(Wakeup) })
[0.121551570s] [INFO ] [alacritty] winit event: AboutToWait
[0.121572189s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356164, tv_nsec: 705092020 }, requested_resume: None })
[0.121583401s] [INFO ] [alacritty] winit event: AboutToWait
[0.133095039s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356164, tv_nsec: 708507774 }, requested_resume: None })
[0.133119416s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: RedrawRequested }
[0.134407308s] [INFO ] [alacritty] winit event: AboutToWait
[0.667850590s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356164, tv_nsec: 732963178 }, requested_resume: None })
[0.667878874s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: KeyboardInput { device_id: DeviceId(Wayland(DeviceId)), event: KeyEvent { physical_key: Code(KeyV), logical_key: Character("v"), text: Some("v"), location: Standard, state: Pressed, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Character("v"), text_with_all_modifiers: Some("v") } }, is_synthetic: false } }
[0.667902198s] [INFO ] [alacritty] winit event: AboutToWait
[0.668111858s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356165, tv_nsec: 251509065 }, requested_resume: None })
[0.668128269s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(94409532888736))), payload: Terminal(Wakeup) })
[0.668145011s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: RedrawRequested }
[0.669547020s] [INFO ] [alacritty] winit event: AboutToWait
[0.669586546s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356165, tv_nsec: 253095626 }, requested_resume: None })
[0.669601534s] [INFO ] [alacritty] winit event: AboutToWait
[0.719575737s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356165, tv_nsec: 266974131 }, requested_resume: None })
[0.719599312s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: KeyboardInput { device_id: DeviceId(Wayland(DeviceId)), event: KeyEvent { physical_key: Code(KeyV), logical_key: Character("v"), text: Some("v"), location: Standard, state: Released, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Character("v"), text_with_all_modifiers: Some("v") } }, is_synthetic: false } }
[0.719624270s] [INFO ] [alacritty] winit event: AboutToWait
[0.777839094s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356165, tv_nsec: 303169319 }, requested_resume: None })
[0.777862889s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: KeyboardInput { device_id: DeviceId(Wayland(DeviceId)), event: KeyEvent { physical_key: Code(KeyI), logical_key: Character("i"), text: Some("i"), location: Standard, state: Pressed, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Character("i"), text_with_all_modifiers: Some("i") } }, is_synthetic: false } }
[0.777891033s] [INFO ] [alacritty] winit event: AboutToWait
[0.778105992s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356165, tv_nsec: 361483401 }, requested_resume: None })
[0.778128324s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(94409532888736))), payload: Terminal(Wakeup) })
[0.778147200s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: RedrawRequested }
[0.779284616s] [INFO ] [alacritty] winit event: AboutToWait
[0.779323851s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356165, tv_nsec: 362832941 }, requested_resume: None })
[0.779339090s] [INFO ] [alacritty] winit event: AboutToWait
[0.851089095s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356165, tv_nsec: 366831475 }, requested_resume: None })
[0.851112630s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: KeyboardInput { device_id: DeviceId(Wayland(DeviceId)), event: KeyEvent { physical_key: Code(KeyI), logical_key: Character("i"), text: Some("i"), location: Standard, state: Released, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Character("i"), text_with_all_modifiers: Some("i") } }, is_synthetic: false } }
[0.851137257s] [INFO ] [alacritty] winit event: AboutToWait
[0.911604209s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356165, tv_nsec: 434682516 }, requested_resume: None })
[0.911631301s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: KeyboardInput { device_id: DeviceId(Wayland(DeviceId)), event: KeyEvent { physical_key: Code(KeyM), logical_key: Character("m"), text: Some("m"), location: Standard, state: Pressed, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Character("m"), text_with_all_modifiers: Some("m") } }, is_synthetic: false } }
[0.911659635s] [INFO ] [alacritty] winit event: AboutToWait
[0.911873121s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356165, tv_nsec: 495252244 }, requested_resume: None })
[0.911895574s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(94409532888736))), payload: Terminal(Wakeup) })
[0.911916324s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: RedrawRequested }
[0.913094006s] [INFO ] [alacritty] winit event: AboutToWait
[0.913132970s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356165, tv_nsec: 496642341 }, requested_resume: None })
[0.913148029s] [INFO ] [alacritty] winit event: AboutToWait
[0.985811003s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356165, tv_nsec: 501385432 }, requested_resume: None })
[0.985839577s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: KeyboardInput { device_id: DeviceId(Wayland(DeviceId)), event: KeyEvent { physical_key: Code(KeyM), logical_key: Character("m"), text: Some("m"), location: Standard, state: Released, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Character("m"), text_with_all_modifiers: Some("m") } }, is_synthetic: false } }
[0.985860337s] [INFO ] [alacritty] winit event: AboutToWait
[1.636821418s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356165, tv_nsec: 745155452 }, requested_resume: None })
[1.636849050s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: KeyboardInput { device_id: DeviceId(Wayland(DeviceId)), event: KeyEvent { physical_key: Code(Enter), logical_key: Named(Enter), text: Some("\r"), location: Standard, state: Pressed, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Named(Enter), text_with_all_modifiers: Some("\r") } }, is_synthetic: false } }
[1.636877184s] [INFO ] [alacritty] winit event: AboutToWait
[1.637001010s] [TRACE] [alacritty_terminal] Carriage return
[1.637021178s] [TRACE] [alacritty_terminal] Linefeed
[1.637033692s] [TRACE] [alacritty_terminal] Unsetting private mode: BracketedPaste
[1.637045304s] [TRACE] [alacritty_terminal] Carriage return
[1.637101942s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356166, tv_nsec: 220444585 }, requested_resume: None })
[1.637124334s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(94409532888736))), payload: Terminal(Wakeup) })
[1.637145114s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: RedrawRequested }
[1.638239037s] [INFO ] [alacritty] winit event: AboutToWait
[1.638277630s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356166, tv_nsec: 221787031 }, requested_resume: None })
[1.638293170s] [INFO ] [alacritty] winit event: AboutToWait
[1.647383729s] [TRACE] [alacritty_terminal] Setting private mode: SwapScreenAndSetRestoreCursor
[1.647415379s] [TRACE] [alacritty_terminal] Pushing 'Some("mark@c3p-214:~/src/alacritty")' onto title stack
[1.647430227s] [TRACE] [alacritty_terminal] Setting private mode: CursorKeys
[1.647440156s] [TRACE] [alacritty_terminal] Setting keypad application mode
[1.647449524s] [TRACE] [alacritty_terminal] Setting private mode: BracketedPaste
[1.647458301s] [TRACE] [alacritty_terminal] Setting private mode: ReportFocusInOut
[1.647474412s] [TRACE] [alacritty_terminal] Setting scrolling region: (0;33)
[1.647487026s] [TRACE] [alacritty_terminal] Going to: line=0, col=0
[1.647497415s] [TRACE] [alacritty_terminal] Setting private mode: BlinkingCursor
[1.647510671s] [TRACE] [alacritty_terminal] Unsetting private mode: BlinkingCursor
[1.647520940s] [TRACE] [alacritty_terminal] Pushing 'Some("mark@c3p-214:~/src/alacritty")' onto title stack
[1.647530528s] [TRACE] [alacritty_terminal] Pushing 'Some("mark@c3p-214:~/src/alacritty")' onto title stack
[1.647542742s] [TRACE] [alacritty_terminal] Setting attribute: CancelReverse
[1.647539736s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356166, tv_nsec: 221976021 }, requested_resume: None })
[1.647553202s] [TRACE] [alacritty_terminal] Setting attribute: CancelItalic
[1.647567850s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(94409532888736))), payload: Terminal(CursorBlinkingChange) })
[1.647573290s] [TRACE] [alacritty_terminal] Setting attribute: CancelStrike
[1.647585152s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(94409532888736))), payload: Terminal(CursorBlinkingChange) })
[1.647590663s] [TRACE] [alacritty_terminal] Setting attribute: Reset
[1.647600101s] [TRACE] [alacritty_terminal] Going to: line=0, col=0
[1.647600612s] [INFO ] [alacritty] winit event: AboutToWait
[1.647614228s] [TRACE] [alacritty_terminal] Clearing screen: All
[1.647634657s] [TRACE] [alacritty_terminal] Going to: line=1, col=0
[1.647646920s] [TRACE] [alacritty_terminal] Reporting device status: 6
[1.647662019s] [TRACE] [alacritty_terminal] Going to: line=1, col=0
[1.647671347s] [TRACE] [alacritty_terminal] Going to: line=2, col=0
[1.647684782s] [TRACE] [alacritty_terminal] Reporting device status: 6
[1.647694681s] [TRACE] [alacritty_terminal] Going to: line=2, col=0
[1.647706604s] [TRACE] [alacritty_terminal] Going to: line=0, col=0
[1.647715230s] [TRACE] [alacritty_terminal] Reporting secondary device attributes
[1.647738154s] [TRACE] [alacritty_terminal] Requested write of escape sequence for color code 10: color[256]
[1.647750227s] [TRACE] [alacritty_terminal] Requested write of escape sequence for color code 11: color[257]
[1.647770355s] [TRACE] [alacritty_terminal] Unsetting private mode: ShowCursor
[1.647779452s] [TRACE] [alacritty_terminal] Going to: line=1, col=0
[1.647788910s] [TRACE] [alacritty_terminal] Setting attribute: Foreground(Named(BrightBlue))
[1.647820200s] [TRACE] [alacritty_terminal] Going to: line=2, col=0
[1.647850147s] [TRACE] [alacritty_terminal] Going to: line=3, col=0
[1.647879733s] [TRACE] [alacritty_terminal] Going to: line=4, col=0
[1.647909069s] [TRACE] [alacritty_terminal] Going to: line=5, col=0
[1.647938585s] [TRACE] [alacritty_terminal] Going to: line=6, col=0
[1.647967831s] [TRACE] [alacritty_terminal] Going to: line=7, col=0
[1.647997067s] [TRACE] [alacritty_terminal] Going to: line=8, col=0
[1.648026423s] [TRACE] [alacritty_terminal] Going to: line=9, col=0
[1.648055718s] [TRACE] [alacritty_terminal] Going to: line=10, col=0
[1.648085195s] [TRACE] [alacritty_terminal] Going to: line=11, col=0
[1.648114721s] [TRACE] [alacritty_terminal] Going to: line=12, col=0
[1.648144127s] [TRACE] [alacritty_terminal] Going to: line=13, col=0
[1.648173493s] [TRACE] [alacritty_terminal] Going to: line=14, col=0
[1.648198791s] [TRACE] [alacritty_terminal] Going to: line=15, col=0
[1.648221484s] [TRACE] [alacritty_terminal] Going to: line=16, col=0
[1.648243817s] [TRACE] [alacritty_terminal] Going to: line=17, col=0
[1.648266069s] [TRACE] [alacritty_terminal] Going to: line=18, col=0
[1.648288422s] [TRACE] [alacritty_terminal] Going to: line=19, col=0
[1.648310844s] [TRACE] [alacritty_terminal] Going to: line=20, col=0
[1.648333187s] [TRACE] [alacritty_terminal] Going to: line=21, col=0
[1.648355609s] [TRACE] [alacritty_terminal] Going to: line=22, col=0
[1.648378022s] [TRACE] [alacritty_terminal] Going to: line=23, col=0
[1.648400415s] [TRACE] [alacritty_terminal] Going to: line=24, col=0
[1.648422777s] [TRACE] [alacritty_terminal] Going to: line=25, col=0
[1.648447074s] [TRACE] [alacritty_terminal] Going to: line=26, col=0
[1.648475117s] [TRACE] [alacritty_terminal] Going to: line=27, col=0
[1.648498241s] [TRACE] [alacritty_terminal] Going to: line=28, col=0
[1.648520624s] [TRACE] [alacritty_terminal] Going to: line=29, col=0
[1.648543126s] [TRACE] [alacritty_terminal] Going to: line=30, col=0
[1.648565539s] [TRACE] [alacritty_terminal] Going to: line=31, col=0
[1.648587872s] [TRACE] [alacritty_terminal] Setting attribute: Reset
[1.648594584s] [TRACE] [alacritty_terminal] Going to: line=32, col=87
[1.648602129s] [TRACE] [alacritty_terminal] Moving forward: 9
[1.648609062s] [TRACE] [alacritty_terminal] Going to: line=10, col=44
[1.648618229s] [TRACE] [alacritty_terminal] Going to: line=12, col=44
[1.648627207s] [TRACE] [alacritty_terminal] Going to: line=13, col=40
[1.648637276s] [TRACE] [alacritty_terminal] Going to: line=14, col=36
[1.648645602s] [TRACE] [alacritty_terminal] Setting attribute: Foreground(Named(Blue))
[1.648658426s] [TRACE] [alacritty_terminal] Setting attribute: Reset
[1.648665449s] [TRACE] [alacritty_terminal] Going to: line=15, col=31
[1.648678604s] [TRACE] [alacritty_terminal] Going to: line=17, col=38
[1.648689525s] [TRACE] [alacritty_terminal] Going to: line=18, col=29
[1.648699214s] [TRACE] [alacritty_terminal] Setting attribute: Foreground(Named(Blue))
[1.648707199s] [TRACE] [alacritty_terminal] Setting attribute: Reset
[1.648716657s] [TRACE] [alacritty_terminal] Going to: line=20, col=29
[1.648724502s] [TRACE] [alacritty_terminal] Setting attribute: Foreground(Named(Blue))
[1.648732517s] [TRACE] [alacritty_terminal] Setting attribute: Reset
[1.648744079s] [TRACE] [alacritty_terminal] Going to: line=21, col=29
[1.648752295s] [TRACE] [alacritty_terminal] Setting attribute: Foreground(Named(Blue))
[1.648760009s] [TRACE] [alacritty_terminal] Setting attribute: Reset
[1.648767243s] [TRACE] [alacritty_terminal] Setting attribute: Foreground(Named(Blue))
[1.648774597s] [TRACE] [alacritty_terminal] Setting attribute: Reset
[1.648783835s] [TRACE] [alacritty_terminal] Going to: line=22, col=29
[1.648793603s] [TRACE] [alacritty_terminal] Setting attribute: Foreground(Named(Blue))
[1.648801348s] [TRACE] [alacritty_terminal] Setting attribute: Reset
[1.648810676s] [TRACE] [alacritty_terminal] Going to: line=0, col=0
[1.648817419s] [TRACE] [alacritty_terminal] Setting private mode: ShowCursor
[1.648876070s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356166, tv_nsec: 232377336 }, requested_resume: None })
[1.648892522s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(94409532888736))), payload: Terminal(PtyWrite()) })
[1.648903703s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(94409532888736))), payload: Terminal(PtyWrite()) })
[1.648913101s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(94409532888736))), payload: Terminal(PtyWrite()) })
[1.648922449s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(94409532888736))), payload: Terminal(ColorRequest(256)) })
[1.648932678s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(94409532888736))), payload: Terminal(ColorRequest(257)) })
[1.648943599s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(94409532888736))), payload: Terminal(Wakeup) })
[1.648957125s] [INFO ] [alacritty] winit event: AboutToWait
^[[>0;2000;1c[1.649079608s] [TRACE] [alacritty_terminal] Reporting private mode Named(BlinkingCursor)
[1.649100107s] [TRACE] [alacritty_terminal] Unsetting private mode: ShowCursor
[1.649109004s] [TRACE] [alacritty_terminal] Going to: line=32, col=77
[1.649118171s] [TRACE] [alacritty_terminal] Going to: line=0, col=0
[1.649117059s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356166, tv_nsec: 232510239 }, requested_resume: None })
[1.649126647s] [TRACE] [alacritty_terminal] Going to: line=32, col=78
[1.649134442s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(94409532888736))), payload: Terminal(PtyWrite()) })
[1.649137839s] [TRACE] [alacritty_terminal] Going to: line=0, col=0
[1.649147227s] [TRACE] [alacritty_terminal] Going to: line=32, col=79
[1.649149120s] [INFO ] [alacritty] winit event: AboutToWait
[1.649154290s] [TRACE] [alacritty_terminal] Going to: line=0, col=0
[1.649161023s] [TRACE] [alacritty_terminal] Going to: line=32, col=80
[1.649167746s] [TRACE] [alacritty_terminal] Going to: line=0, col=0
[1.649176152s] [TRACE] [alacritty_terminal] Going to: line=32, col=81
[1.649182905s] [TRACE] [alacritty_terminal] Going to: line=0, col=0
[1.649189728s] [TRACE] [alacritty_terminal] Going to: line=32, col=82
[1.649196370s] [TRACE] [alacritty_terminal] Going to: line=0, col=0
[1.649202822s] [TRACE] [alacritty_terminal] Going to: line=32, col=83
[1.649209435s] [TRACE] [alacritty_terminal] Going to: line=0, col=0
[1.649215807s] [TRACE] [alacritty_terminal] Going to: line=32, col=84
[1.649221999s] [TRACE] [alacritty_terminal] Going to: line=0, col=0
[1.649228181s] [TRACE] [alacritty_terminal] Going to: line=32, col=85
[1.649234533s] [TRACE] [alacritty_terminal] Going to: line=0, col=0
[1.649240715s] [TRACE] [alacritty_terminal] Going to: line=32, col=86
[1.649246866s] [TRACE] [alacritty_terminal] Going to: line=0, col=0
^[[?12;2$p[1.649290379s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356166, tv_nsec: 232802445 }, requested_resume: None })
[1.649305077s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(94409532888736))), payload: Terminal(Wakeup) })
[1.649318362s] [INFO ] [alacritty] winit event: AboutToWait
[1.649408755s] [TRACE] [alacritty_terminal] Going to: line=32, col=77
[1.649420597s] [TRACE] [alacritty_terminal] Going to: line=0, col=0
[1.649427811s] [TRACE] [alacritty_terminal] Setting attribute: CancelReverse
[1.649435596s] [TRACE] [alacritty_terminal] Setting attribute: CancelItalic
[1.649442278s] [TRACE] [alacritty_terminal] Setting attribute: CancelStrike
[1.649449121s] [TRACE] [alacritty_terminal] Setting attribute: Reset
[1.649455534s] [TRACE] [alacritty_terminal] Going to: line=0, col=0
[1.649461926s] [TRACE] [alacritty_terminal] Clearing screen: All
[1.649535786s] [TRACE] [alacritty_terminal] Going to: line=1, col=0
[1.649543441s] [TRACE] [alacritty_terminal] Setting attribute: Foreground(Named(BrightBlue))
[1.649565072s] [TRACE] [alacritty_terminal] Going to: line=2, col=0
[1.649585972s] [TRACE] [alacritty_terminal] Going to: line=3, col=0
[1.649606591s] [TRACE] [alacritty_terminal] Going to: line=4, col=0
[1.649627160s] [TRACE] [alacritty_terminal] Going to: line=5, col=0
[1.649647700s] [TRACE] [alacritty_terminal] Going to: line=6, col=0
[1.649668289s] [TRACE] [alacritty_terminal] Going to: line=7, col=0
[1.649688938s] [TRACE] [alacritty_terminal] Going to: line=8, col=0
[1.649709617s] [TRACE] [alacritty_terminal] Going to: line=9, col=0
[1.649730277s] [TRACE] [alacritty_terminal] Going to: line=10, col=0
[1.649751126s] [TRACE] [alacritty_terminal] Going to: line=11, col=0
[1.649771846s] [TRACE] [alacritty_terminal] Going to: line=12, col=0
[1.649794309s] [TRACE] [alacritty_terminal] Going to: line=13, col=0
[1.649815128s] [TRACE] [alacritty_terminal] Going to: line=14, col=0
[1.649836048s] [TRACE] [alacritty_terminal] Going to: line=15, col=0
[1.649856838s] [TRACE] [alacritty_terminal] Going to: line=16, col=0
[1.649878439s] [TRACE] [alacritty_terminal] Going to: line=17, col=0
[1.649899499s] [TRACE] [alacritty_terminal] Going to: line=18, col=0
[1.649924987s] [TRACE] [alacritty_terminal] Going to: line=19, col=0
[1.649945707s] [TRACE] [alacritty_terminal] Going to: line=20, col=0
[1.649966416s] [TRACE] [alacritty_terminal] Going to: line=21, col=0
[1.649987086s] [TRACE] [alacritty_terminal] Going to: line=22, col=0
[1.650007625s] [TRACE] [alacritty_terminal] Going to: line=23, col=0
[1.650028184s] [TRACE] [alacritty_terminal] Going to: line=24, col=0
[1.650051258s] [TRACE] [alacritty_terminal] Going to: line=25, col=0
[1.650072128s] [TRACE] [alacritty_terminal] Going to: line=26, col=0
[1.650092707s] [TRACE] [alacritty_terminal] Going to: line=27, col=0
[1.650113276s] [TRACE] [alacritty_terminal] Going to: line=28, col=0
[1.650133915s] [TRACE] [alacritty_terminal] Going to: line=29, col=0
[1.650154515s] [TRACE] [alacritty_terminal] Going to: line=30, col=0
[1.650175064s] [TRACE] [alacritty_terminal] Going to: line=31, col=0
[1.650195843s] [TRACE] [alacritty_terminal] Setting attribute: Reset
[1.650202255s] [TRACE] [alacritty_terminal] Going to: line=32, col=87
[1.650209319s] [TRACE] [alacritty_terminal] Moving forward: 9
[1.650216282s] [TRACE] [alacritty_terminal] Going to: line=10, col=44
[1.650225430s] [TRACE] [alacritty_terminal] Going to: line=12, col=44
[1.650233104s] [TRACE] [alacritty_terminal] Going to: line=13, col=40
[1.650241470s] [TRACE] [alacritty_terminal] Going to: line=14, col=36
[1.650249676s] [TRACE] [alacritty_terminal] Setting attribute: Foreground(Indexed(81))
[1.650258382s] [TRACE] [alacritty_terminal] Setting attribute: Reset
[1.650264424s] [TRACE] [alacritty_terminal] Going to: line=15, col=31
[1.650274503s] [TRACE] [alacritty_terminal] Going to: line=17, col=38
[1.650283230s] [TRACE] [alacritty_terminal] Going to: line=18, col=29
[1.650291335s] [TRACE] [alacritty_terminal] Setting attribute: Foreground(Indexed(81))
[1.650298368s] [TRACE] [alacritty_terminal] Setting attribute: Reset
[1.650306113s] [TRACE] [alacritty_terminal] Going to: line=20, col=29
[1.650313327s] [TRACE] [alacritty_terminal] Setting attribute: Foreground(Indexed(81))
[1.650320310s] [TRACE] [alacritty_terminal] Setting attribute: Reset
[1.650329237s] [TRACE] [alacritty_terminal] Going to: line=21, col=29
[1.650336521s] [TRACE] [alacritty_terminal] Setting attribute: Foreground(Indexed(81))
[1.650343514s] [TRACE] [alacritty_terminal] Setting attribute: Reset
[1.650350578s] [TRACE] [alacritty_terminal] Setting attribute: Foreground(Indexed(81))
[1.650357170s] [TRACE] [alacritty_terminal] Setting attribute: Reset
[1.650364945s] [TRACE] [alacritty_terminal] Going to: line=22, col=29
[1.650373101s] [TRACE] [alacritty_terminal] Setting attribute: Foreground(Indexed(81))
[1.650379783s] [TRACE] [alacritty_terminal] Setting attribute: Reset
[1.650387618s] [TRACE] [alacritty_terminal] Going to: line=0, col=0
[1.650394031s] [TRACE] [alacritty_terminal] Setting private mode: ShowCursor
[1.650400152s] [TRACE] [alacritty_terminal] Bell
[1.650409029s] [TRACE] [alacritty_terminal] Unsetting private mode: ShowCursor
[1.650415441s] [TRACE] [alacritty_terminal] Going to: line=32, col=77
[1.650422004s] [TRACE] [alacritty_terminal] Going to: line=0, col=0
[1.650425360s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356166, tv_nsec: 232859945 }, requested_resume: None })
[1.650428196s] [TRACE] [alacritty_terminal] Going to: line=32, col=77
[1.650439317s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(94409532888736))), payload: Terminal(Bell) })
[1.650443996s] [TRACE] [alacritty_terminal] Going to: line=0, col=0
[1.650449977s] [TRACE] [alacritty_terminal] Going to: line=10, col=44
[1.650451620s] [INFO ] [alacritty] winit event: AboutToWait
[1.650456650s] [TRACE] [alacritty_terminal] Setting attribute: Foreground(Named(BrightBlue))
[1.650465216s] [TRACE] [alacritty_terminal] Going to: line=12, col=44
[1.650477570s] [TRACE] [alacritty_terminal] Going to: line=13, col=40
[1.650486136s] [TRACE] [alacritty_terminal] Going to: line=14, col=36
[1.650495333s] [TRACE] [alacritty_terminal] Going to: line=15, col=31
[1.650505343s] [TRACE] [alacritty_terminal] Going to: line=17, col=38
[1.650513979s] [TRACE] [alacritty_terminal] Going to: line=18, col=29
[1.650524148s] [TRACE] [alacritty_terminal] Going to: line=20, col=29
[1.650534248s] [TRACE] [alacritty_terminal] Going to: line=21, col=29
[1.650544377s] [TRACE] [alacritty_terminal] Going to: line=22, col=29
[1.650554556s] [TRACE] [alacritty_terminal] Setting attribute: Reset
[1.650562451s] [TRACE] [alacritty_terminal] Going to: line=32, col=87
[1.650568994s] [TRACE] [alacritty_terminal] Going to: line=0, col=0
[1.650575165s] [TRACE] [alacritty_terminal] Setting private mode: ShowCursor
[1.650613969s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356166, tv_nsec: 234127117 }, requested_resume: None })
[1.650628096s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(94409532888736))), payload: Terminal(Wakeup) })
[1.650640460s] [INFO ] [alacritty] winit event: AboutToWait
[1.650738456s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356166, tv_nsec: 234181601 }, requested_resume: None })
[1.650756350s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: RedrawRequested }
[1.652064591s] [INFO ] [alacritty] winit event: AboutToWait
[1.652102814s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356166, tv_nsec: 235612255 }, requested_resume: None })
[1.652117532s] [INFO ] [alacritty] winit event: AboutToWait
[1.667361137s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356166, tv_nsec: 235743906 }, requested_resume: None })
[1.667384812s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: RedrawRequested }
[1.668563306s] [INFO ] [alacritty] winit event: AboutToWait
[1.715821418s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356166, tv_nsec: 267607376 }, requested_resume: None })
[1.715843740s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: KeyboardInput { device_id: DeviceId(Wayland(DeviceId)), event: KeyEvent { physical_key: Code(Enter), logical_key: Named(Enter), text: Some("\r"), location: Standard, state: Released, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Named(Enter), text_with_all_modifiers: Some("\r") } }, is_synthetic: false } }
[1.715869910s] [INFO ] [alacritty] winit event: AboutToWait
[3.642906975s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356166, tv_nsec: 470382269 }, requested_resume: None })
[3.642931802s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: KeyboardInput { device_id: DeviceId(Wayland(DeviceId)), event: KeyEvent { physical_key: Code(ShiftLeft), logical_key: Named(Shift), text: None, location: Left, state: Pressed, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Named(Shift), text_with_all_modifiers: None } }, is_synthetic: false } }
[3.642955918s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: ModifiersChanged(Modifiers { state: ModifiersState(SHIFT), pressed_mods: ModifiersKeys(0x0) }) }
[3.642972700s] [INFO ] [alacritty] winit event: AboutToWait
[3.644680522s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356168, tv_nsec: 226536925 }, requested_resume: None })
[3.644701141s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: KeyboardInput { device_id: DeviceId(Wayland(DeviceId)), event: KeyEvent { physical_key: Code(SuperLeft), logical_key: Named(Super), text: None, location: Left, state: Pressed, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Named(Super), text_with_all_modifiers: None } }, is_synthetic: false } }
[3.644712162s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: ModifiersChanged(Modifiers { state: ModifiersState(SHIFT | SUPER), pressed_mods: ModifiersKeys(0x0) }) }
[3.644724736s] [INFO ] [alacritty] winit event: AboutToWait
[3.877900624s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356168, tv_nsec: 228284613 }, requested_resume: None })
[3.877936192s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94409532888736)), event: CloseRequested }
[3.877957192s] [INFO ] [alacritty] winit event: AboutToWait
[3.877997288s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 356168, tv_nsec: 461506870 }, requested_resume: None })
[3.878010774s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(94409532888736))), payload: Terminal(Exit) })
[3.879979292s] [INFO ] [alacritty] winit event: AboutToWait
[3.879996034s] [INFO ] [alacritty] winit event: LoopExiting
[3.887926825s] [INFO ] [alacritty] Goodbye
</pre>
</details>


Discussion / hints:
>starting vim within Alacritty causes it to paste the contents of its default "yank" register at startup.

We don't have such a concept.

>This behavior was introduced in https://github.com/alacritty/alacritty/commit/0589b7189445e5ee236a7ab17b4f3a2047543481 (DECRPM/DECRQM support) and it seems to be triggered by running report_private_mode for NamedPrivateMode::BlinkingCursor. If I add a return [here](https://github.com/alacritty/alacritty/blob/5adfc4fb00d1b523bd17bbd73515d30636de0a0e/alacritty_terminal/src/term/mod.rs#L1888) to disable that single mode, the problem is no longer visible.

And how it's our issue? vim asked us to paste status whether the mode is active or not, we pasted status? Like it clearly got what it asked for and bugged during handling.

>The problem does not happen when using TERM=alacritty. I can also work around it by adding set t_RV= to my .vimrc.

The only supported term is `alacritty`.
Ah, I just can't read.

Fix patch:
diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs
index f56fa605b6c..eeecc50d656 100644
--- a/alacritty_terminal/src/term/mod.rs
+++ b/alacritty_terminal/src/term/mod.rs
@@ -1922,7 +1922,7 @@ impl<T: EventListener> Handler for Term<T> {
         };
 
         self.event_proxy.send_event(Event::PtyWrite(format!(
-            "\x1b[?{};{}$p",
+            "\x1b[?{};{}$y",
             mode.raw(),
             state as u8,
         )));
@@ -1979,7 +1979,7 @@ impl<T: EventListener> Handler for Term<T> {
         };
 
         self.event_proxy.send_event(Event::PtyWrite(format!(
-            "\x1b[{};{}$p",
+            "\x1b[{};{}$y",
             mode.raw(),
             state as u8,
         )));


Test patch: