diff options
author | Jim Meyering <jim@meyering.net> | 1993-12-19 06:20:51 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1993-12-19 06:20:51 +0000 |
commit | 7061c33d7b516ca457126be8c9ff6f6dc19f1919 (patch) | |
tree | c3bec0f68d6423a16b79ca6185eac6176b1ab08d /src/cut.c | |
parent | 0311e952db41b835fc371c11489ecfcb70d3d8d2 (diff) | |
download | coreutils-7061c33d7b516ca457126be8c9ff6f6dc19f1919.tar.xz |
(set_fields): Convert ranges like 3-5,6- into 3-.
Before, this was off-by-two and converted 3-5,4-, but not 3-5,5-
Diffstat (limited to 'src/cut.c')
-rw-r--r-- | src/cut.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -353,9 +353,11 @@ set_fields (fieldstr) /* No, the new sequence starts before the old. Does the old range going to end of line extend into the new range? */ - if (eol_range_start < value) + if (value >= eol_range_start - 1) + { /* Yes. Simply move the end of line marker. */ eol_range_start = initial; + } else { /* No. A simple range, before and disjoint from |