make all 8 X buffers available. no args uses the default buffer, giving 0-7

as an agument to in_paste_buffer specifies which buffer to use.
This commit is contained in:
Bill Currie 2001-11-01 22:52:22 +00:00
parent 5f5060cbf0
commit a45b78b622
1 changed files with 15 additions and 1 deletions

View File

@ -130,7 +130,21 @@ in_paste_buffer_f (void)
char *bytes, *p;
int num_bytes;
bytes = XFetchBytes (x_disp, &num_bytes);
if (Cmd_Argc () >= 2) {
const char *val;
char *end;
int buffer;
val = Cmd_Argv (1);
buffer = strtol (val, &end, 10);
if (end == val || buffer < 0 || buffer > 7) {
Sys_Printf ("invalid buffer number");
return;
}
bytes = XFetchBuffer (x_disp, &num_bytes, buffer);
} else {
bytes = XFetchBytes (x_disp, &num_bytes);
}
if (!num_bytes)
return;
// get bytes to keys.c