mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Tidy up various bits of the paste code, make the data buffer char * and add
comments.
This commit is contained in:
4
status.c
4
status.c
@ -882,6 +882,7 @@ status_prompt_key(struct client *c, int key)
|
||||
{
|
||||
struct paste_buffer *pb;
|
||||
char *s, *first, *last, word[64], swapc;
|
||||
u_char ch;
|
||||
size_t size, n, off, idx;
|
||||
|
||||
size = strlen(c->prompt_buffer);
|
||||
@ -1023,7 +1024,8 @@ status_prompt_key(struct client *c, int key)
|
||||
if ((pb = paste_get_top(&c->session->buffers)) == NULL)
|
||||
break;
|
||||
for (n = 0; n < pb->size; n++) {
|
||||
if (pb->data[n] < 32 || pb->data[n] == 127)
|
||||
ch = (u_char) pb->data[n];
|
||||
if (ch < 32 || ch == 127)
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user