Skip the leading return character when this is the first line in the paste buffer

This commit is contained in:
David Schmidt 2013-02-01 14:24:59 +00:00
parent 8b8e9b32dc
commit b93084200a

View File

@ -533,6 +533,8 @@ clipboard_paste(void)
bufsize += CHUNK_SIZE + 1;
expanding_buffer = realloc(expanding_buffer, bufsize);
}
/* Skip the leading return character when this is the first line in the paste buffer */
if (strlen((char*)expanding_buffer) > 0)
strcat((char*)expanding_buffer,"\r");
strncat((char*)expanding_buffer,buffer,strlen(buffer));
g_clipboard = (char*)expanding_buffer;