bakkeby / st-flexipatch

An st build with preprocessor directives to decide which patches to include during build time
MIT License
347 stars 107 forks source link

Cannot paste well from mouse selection in vim due to bracketed paste mode #134

Closed blcc closed 4 months ago

blcc commented 4 months ago

First, I guess it only happened on my old machine: Debian 11 (bullseye), self build libxft.

When paste mouse selection, vim receive control character first. Which cause vim switch to command mode before paste context.

It is bracketed paste mode from xterm, vim supported it since 8. vim need to recognize terminal as xterm to activate the support. Add this setting in vimrc solve the problem: set term=xterm-256color

There's another issue, perhaps only on my machine too. The clear command and Ctrl-L only move cursor to top without clear screen. I copy/paste st.c -> csihandle() -> case 'J' -> case 2 to case 3. Somehow it works.

These two issue may not be necessary to fix in code. But still worth be recorded here.