Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit 996984a

Browse files
tummetottlukas-reineke
authored andcommitted
fix: make file_info provider not return a trailing whitespace (#171)
1 parent f5aca53 commit 996984a

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

lua/feline/presets/default.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ M.active[1] = {
3333
'slant_left_2',
3434
{str = ' ', hl = {bg = 'oceanblue', fg = 'NONE'}}
3535
},
36-
right_sep = {'slant_right_2', ' '}
36+
right_sep = {
37+
{str = ' ', hl = {bg = 'oceanblue', fg = 'NONE'}},
38+
'slant_right_2', ' '
39+
}
3740
},
3841
{
3942
provider = 'file_size',

lua/feline/presets/noicon.lua

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,17 @@ M.active[1] = {
3131
bg = 'oceanblue',
3232
style = 'bold'
3333
},
34-
right_sep = ' ',
34+
left_sep = '',
35+
right_sep = {
36+
{
37+
str = ' ',
38+
hl = {
39+
fg = 'NONE',
40+
bg = 'oceanblue'
41+
},
42+
},
43+
' '
44+
},
3545
icon = ''
3646
},
3747
{

lua/feline/providers/file.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ function M.file_info(component, opts)
119119
if bo.modified then
120120
modified_str = opts.file_modified_icon or ''
121121

122-
if modified_str ~= '' then modified_str = modified_str .. ' ' end
122+
if modified_str ~= '' then modified_str = ' ' .. modified_str end
123123
else
124124
modified_str = ''
125125
end
126126

127-
return string.format(' %s%s %s', readonly_str, filename, modified_str), icon
127+
return string.format(' %s%s%s', readonly_str, filename, modified_str), icon
128128
end
129129

130130
function M.file_size()

0 commit comments

Comments
 (0)