aboutsummaryrefslogtreecommitdiff
path: root/text.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2014-09-19 12:53:18 +0200
committerMarc André Tanner <mat@brain-dump.org>2014-09-19 12:53:18 +0200
commitffa12d93c7efc516ead1dfc798f9afc0d3ec1aa1 (patch)
tree574635d1ed446def3fc894379eef036494f42964 /text.c
parentf212b9d4952c87052e23b5161195917410b7c911 (diff)
downloadvis-ffa12d93c7efc516ead1dfc798f9afc0d3ec1aa1.tar.gz
vis-ffa12d93c7efc516ead1dfc798f9afc0d3ec1aa1.tar.xz
Windows style newlines are actually \r\n not \n\r
This is fiddely stuff, hopefully it doesn't break too much
Diffstat (limited to 'text.c')
-rw-r--r--text.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/text.c b/text.c
index c917781..28115fd 100644
--- a/text.c
+++ b/text.c
@@ -1000,11 +1000,8 @@ static size_t lines_skip_forward(Text *txt, size_t pos, size_t lines) {
lines--;
}
- if (lines == 0) {
- if (start < it.end && *start == '\r')
- pos++;
+ if (lines == 0)
break;
- }
}
return pos;
}