diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-04-08 22:11:57 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-04-09 11:28:06 +0200 |
| commit | 4f15fee811d2645bf810a475d4272f83c30608d6 (patch) | |
| tree | e61902723c42378b78b43e42bf55f37ec216d702 /vis-lua.c | |
| parent | 6a6bc5bb4c1b5be36b342266d0f74ec4a2843b00 (diff) | |
| download | vis-4f15fee811d2645bf810a475d4272f83c30608d6.tar.gz vis-4f15fee811d2645bf810a475d4272f83c30608d6.tar.xz | |
vis: remove handling of \r\n line endings
Use something like dos2unix(1) and unix2dos(1), if you
need to edit such files.
Diffstat (limited to 'vis-lua.c')
| -rw-r--r-- | vis-lua.c | 22 |
1 files changed, 0 insertions, 22 deletions
@@ -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); @@ -1872,10 +1869,6 @@ static const struct luaL_Reg window_cursor_funcs[] = { * 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; |
