aboutsummaryrefslogtreecommitdiffstats
path: root/src/window-xlib.c
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-06-05 10:51:46 -0400
committerJesse Luehrs <doy@tozt.net>2014-06-05 10:51:46 -0400
commit0454f561e92d24453642f12e8b4c345813fa8dd5 (patch)
tree16bcb38843646650ce235db393b301abea34fcf5 /src/window-xlib.c
parent533feb18c09f4347005c21917fe78c4b11959ffa (diff)
downloadrunes-0454f561e92d24453642f12e8b4c345813fa8dd5.tar.gz
runes-0454f561e92d24453642f12e8b4c345813fa8dd5.zip
implement bracketed paste mode (fixes #56)
Diffstat (limited to 'src/window-xlib.c')
-rw-r--r--src/window-xlib.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/window-xlib.c b/src/window-xlib.c
index 788d5a8..6a924ec 100644
--- a/src/window-xlib.c
+++ b/src/window-xlib.c
@@ -903,7 +903,13 @@ static void runes_window_backend_handle_selection_notify_event(
XGetWindowProperty(
w->dpy, e->requestor, e->property, 0, 0x1fffffff, 0,
AnyPropertyType, &type, &format, &nitems, &left, &buf);
+ if (t->scr.bracketed_paste) {
+ runes_pty_backend_write(t, "\e[200~", 6);
+ }
runes_pty_backend_write(t, (char *)buf, nitems);
+ if (t->scr.bracketed_paste) {
+ runes_pty_backend_write(t, "\e[201~", 6);
+ }
XFree(buf);
}
}