diff --git a/line.c b/line.c index 02eb65d..e0fa6ed 100644 --- a/line.c +++ b/line.c @@ -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; diff --git a/tststr.cmd b/tststr.cmd index 988a4b0..9f524b1 100644 --- a/tststr.cmd +++ b/tststr.cmd @@ -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 +