diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-02-21 10:05:34 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-02-21 10:05:34 +0100 |
| commit | b8938fe1d099d1b5b6ceecda6668b879e6a49298 (patch) | |
| tree | bb539171afa6d9bb90cad92fc4822db0f0cc9ce4 /vis.c | |
| parent | b56c629d8200b891bcf6822cfa4425ccc9849567 (diff) | |
| download | vis-b8938fe1d099d1b5b6ceecda6668b879e6a49298.tar.gz vis-b8938fe1d099d1b5b6ceecda6668b879e6a49298.tar.xz | |
Cleanup new line insertion code
Diffstat (limited to 'vis.c')
| -rw-r--r-- | vis.c | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -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) |
