From b8938fe1d099d1b5b6ceecda6668b879e6a49298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sun, 21 Feb 2016 10:05:34 +0100 Subject: Cleanup new line insertion code --- vis.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'vis.c') diff --git a/vis.c b/vis.c index 0d4fd9d..1707dab 100644 --- a/vis.c +++ b/vis.c @@ -1103,16 +1103,7 @@ static void copy_indent_from_previous_line(Win *win) { } void vis_insert_nl(Vis *vis) { - const char *nl; - switch (text_newline_type(vis->win->file->text)) { - case TEXT_NEWLINE_CRNL: - nl = "\r\n"; - break; - default: - nl = "\n"; - break; - } - + const char *nl = text_newline_char(vis->win->file->text); vis_insert_key(vis, nl, strlen(nl)); if (vis->autoindent) -- cgit v1.2.3