increase value length for newline substitution
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 10 Sep 2019 19:57:14 +0000 (21:57 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Thu, 12 Sep 2019 15:48:11 +0000 (17:48 +0200)
Off by one since inclusion of placeholders in commit v1.02-6-g05d1a75398
(2019-09-07) [value placeholder in contents].

barcat

diff --git a/barcat b/barcat
index cdb41dafce082c0afa399f98874f4891314c4e78..4cb2cd14ce69467cb6767f063100c6774cef328b 100755 (executable)
--- a/barcat
+++ b/barcat
@@ -112,7 +112,7 @@ while (readline) {
                my $trimpos = abs $opt{trim};
                $trimpos -= length $1 if $opt{unmodified};
                if ($trimpos <= 1) {
-                       $_ = substr $_, 0, 1;
+                       $_ = substr $_, 0, 2;
                }
                elsif (length > $trimpos) {
                        substr($_, $trimpos - 1) = '…';