Fix $kill to cover at most first 127 characters of kill buffer. Was only first N % 250 (ex 25 out of 275).

This commit is contained in:
Renaud 2014-06-03 15:45:41 +08:00
parent 3197080cb1
commit a560025c0c
2 changed files with 14 additions and 1 deletions

2
line.c
View File

@ -63,7 +63,7 @@ char *getkill( void)
value[0] = 0;
else {
/* copy in the contents... */
if (kused < NSTRING)
if( kbufh == kbufp && kused < NSTRING)
size = kused;
else
size = NSTRING - 1;

View File

@ -33,5 +33,18 @@ insert-string &cat "Filename: " $cfname
newline
insert-string "Filename length: "
insert-string &len $cfname
end-of-file
; Create a line longer than 1 kill block (250), 2 * 127 + 21 = 255
insert-string 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
insert-string 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
insert-string "#12345678901234567890"
; kill and yank
beginning-of-line
kill-to-end-of-line
yank
newline
; insert kill variable (up to 127 characters), was 25 before fix
insert-string $kill
save-file
beginning-of-file