vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 6a2788f0c2f8483649eaeb55e60e00b5c3b821a8
parent 8b325c1851cdfe363b5cdacb31a3ed3b3befb72c
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Sun,  6 Nov 2016 21:29:40 +0100

vis: change default status bar indication for Windows style line endings

Diffstat:
Mvis-lua.c | 4++--
Mvis.lua | 4++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/vis-lua.c b/vis-lua.c @@ -53,8 +53,8 @@ static void window_status_update(Vis *vis, Win *win) { vis_macro_recording(vis) ? " @": ""); left_count++; - if (text_newline_type(txt) != TEXT_NEWLINE_LF) - strcpy(right_parts[right_count++], "␊"); + if (text_newline_type(txt) == TEXT_NEWLINE_CRLF) + strcpy(right_parts[right_count++], "␍␊"); int cursor_count = view_cursors_count(view); if (cursor_count > 1) { diff --git a/vis.lua b/vis.lua @@ -393,8 +393,8 @@ vis.events.win_status = function(win) table.insert(left_parts, (file.name or '[No Name]') .. (file.modified and ' [+]' or '') .. (vis.recording and ' @' or '')) - if file.newlines ~= "lf" then - table.insert(right_parts, "␊") + if file.newlines == "crlf" then + table.insert(right_parts, "␍␊") end if #win.cursors > 1 then