From de833e2713db5060724b7bd343a2507f1e9a165e Mon Sep 17 00:00:00 2001 From: Famiu Haque Date: Fri, 18 Mar 2022 14:47:15 +0600 Subject: [PATCH 1/3] chore: yank master -> develop (#241) Co-authored-by: Lukas Reineke From 3a9ff036e9255e363e0857406f00b0fe8c3487a8 Mon Sep 17 00:00:00 2001 From: fsouza <108725+fsouza@users.noreply.github.com> Date: Sun, 20 Mar 2022 09:18:28 -0700 Subject: [PATCH 2/3] fix(providers/file_info): don't transform the empty filename (#243) When opening an empty buffer and using the file_info provider with opts.type = 'relative', the filename ends up becoming CWD. The solution is to check that the filename is not empty, set it to '[No Name]' and then skip all transformations. --- lua/feline/providers/file.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lua/feline/providers/file.lua b/lua/feline/providers/file.lua index 818bce9..ae07ca3 100644 --- a/lua/feline/providers/file.lua +++ b/lua/feline/providers/file.lua @@ -82,7 +82,9 @@ function M.file_info(component, opts) end end - if type == 'short-path' then + if filename == '' then + filename = '[No Name]' + elseif type == 'short-path' then filename = fn.pathshorten(filename) elseif type == 'base-only' then filename = fn.fnamemodify(filename, ':t') @@ -98,10 +100,6 @@ function M.file_info(component, opts) filename = fn.fnamemodify(filename, ':t') end - if filename == '' then - filename = '[No Name]' - end - if bo.readonly then readonly_str = opts.file_readonly_icon or '🔒' else From 2219d74f85e893adc10bd356d8d1af1930c02b77 Mon Sep 17 00:00:00 2001 From: Famiu Haque Date: Thu, 24 Mar 2022 22:04:38 +0600 Subject: [PATCH 3/3] docs: add support link to README (#244) --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5cae755..b658c4c 100644 --- a/README.md +++ b/README.md @@ -202,8 +202,10 @@ The name of this plugin is a silly pun based on the convention of the names of s Feline uses [Semantic Versioning](https://semver.org/) for its version names. This is meant to ensure that releases after 1.0 do not break backwards compatibility without a MAJOR version bump, thus allowing users to have better control over when they want to install a change that might potentially break their workflow. -## Self-plug +## Support -If you liked this plugin, also check out: +If you liked this plugin, consider [supporting me.](https://www.buymeacoffee.com/famiuhaque) + +Also check out some of my other work: - [bufdelete.nvim](https://github.com/famiu/bufdelete.nvim) - Delete Neovim buffers without losing your window layout.