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 --- vis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vis.c') diff --git a/vis.c b/vis.c index 9ca39ab..d65b45b 100644 --- a/vis.c +++ b/vis.c @@ -339,7 +339,7 @@ static void mark_set(const Arg *arg); static void insert(const Arg *arg); /* insert a tab or the needed amount of spaces at the current cursor position */ static void insert_tab(const Arg *arg); -/* inserts a newline (either \n or \n\r depending on file type) */ +/* inserts a newline (either \n or \r\n depending on file type) */ static void insert_newline(const Arg *arg); /* add a new line either before or after the one where the cursor currently is */ static void openline(const Arg *arg); @@ -848,7 +848,7 @@ static void insert_tab(const Arg *arg) { } static void insert_newline(const Arg *arg) { - // TODO determine file type to insert \n\r or \n + // TODO determine file type to insert \r\n or \n insert(&(const Arg){ .s = "\n" }); } -- cgit v1.2.3