diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2020-12-17 09:27:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-17 09:27:11 +0100 |
| commit | e5233f39c50b723c562e6a6390ecf46b0237be68 (patch) | |
| tree | de06c23e8e12ddb156e7be8170433e1d6549cb2b /lua/telescope/path.lua | |
| parent | b5ff9de13d4b15e78e9d3433d6bf085601f62a5d (diff) | |
Fix: Use plenary.filetype.detect and remove own filetype detect (#326)
requires newest plenary.nvim version or you will have a bad day
Diffstat (limited to 'lua/telescope/path.lua')
| -rw-r--r-- | lua/telescope/path.lua | 16 |
1 files changed, 0 insertions, 16 deletions
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 |
