diff --git a/src/nnn.c b/src/nnn.c index 5f3c11e5..9bf8e6c8 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -818,7 +818,7 @@ static ssize_t selectiontofd(int fd) if (pos <= lastpos) { if (write(fd, "\n", 1) != 1) return pos; - pbuf += pos + 1; + pbuf += len + 1; } ++pos; }