From ffa12d93c7efc516ead1dfc798f9afc0d3ec1aa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Fri, 19 Sep 2014 12:53:18 +0200 Subject: Windows style newlines are actually \r\n not \n\r This is fiddely stuff, hopefully it doesn't break too much --- text.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'text.c') 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; } -- cgit v1.2.3