From 4f15fee811d2645bf810a475d4272f83c30608d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sat, 8 Apr 2017 22:11:57 +0200 Subject: vis: remove handling of \r\n line endings Use something like dos2unix(1) and unix2dos(1), if you need to edit such files. --- vis-lua.c | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'vis-lua.c') diff --git a/vis-lua.c b/vis-lua.c index e9c5fcf..80e3e38 100644 --- a/vis-lua.c +++ b/vis-lua.c @@ -79,9 +79,6 @@ static void window_status_update(Vis *vis, Win *win) { vis_macro_recording(vis) ? " @": ""); left_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) { Cursor *c = view_cursors_primary_get(view); @@ -1871,10 +1868,6 @@ static const struct luaL_Reg window_cursor_funcs[] = { * lines[i] = i .. ": " .. lines[i] * end */ -/*** - * Type of line endings. - * @tfield string newlines the type of line endings either `lf` (the default) or `crlf` - */ /*** * File size in bytes. * @tfield int size the current file size in bytes @@ -1907,21 +1900,6 @@ static int file_index(lua_State *L) { return 1; } - if (strcmp(key, "newlines") == 0) { - switch (text_newline_type(file->text)) { - case TEXT_NEWLINE_LF: - lua_pushstring(L, "lf"); - break; - case TEXT_NEWLINE_CRLF: - lua_pushstring(L, "crlf"); - break; - default: - lua_pushnil(L); - break; - } - return 1; - } - if (strcmp(key, "size") == 0) { lua_pushunsigned(L, text_size(file->text)); return 1; -- cgit v1.2.3