From e5233f39c50b723c562e6a6390ecf46b0237be68 Mon Sep 17 00:00:00 2001 From: Simon Hauser Date: Thu, 17 Dec 2020 09:27:11 +0100 Subject: Fix: Use plenary.filetype.detect and remove own filetype detect (#326) requires newest plenary.nvim version or you will have a bad day --- lua/telescope/path.lua | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'lua/telescope/path.lua') diff --git a/lua/telescope/path.lua b/lua/telescope/path.lua index 0a47a83..1630ae7 100644 --- a/lua/telescope/path.lua +++ b/lua/telescope/path.lua @@ -56,22 +56,6 @@ path.normalize = function(filepath, cwd) return filepath end -path.read_last_line = function(filepath) - local fd = vim.loop.fs_open(filepath, "r", 438) - if fd == nil then return '' end - local stat = assert(vim.loop.fs_fstat(fd)) - local data = '' - local index = stat.size - 2 - while true do - local char = assert(vim.loop.fs_read(fd, 1, index)) - if char == '\n' then break end - data = char .. data - index = index - 1 - end - assert(vim.loop.fs_close(fd)) - return data -end - path.read_file = function(filepath) local fd = vim.loop.fs_open(filepath, "r", 438) if fd == nil then return '' end -- cgit v1.2.3