Skip to content

Commit 93f8a7d

Browse files
committed
fix(starter): do not show statuscolumn in Starter buffer
Resolve #1481
1 parent 3d81b8a commit 93f8a7d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lua/mini/starter.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,6 +1373,7 @@ H.apply_buffer_options = function(buf_id)
13731373
'nospell',
13741374
'noswapfile',
13751375
'signcolumn=no',
1376+
vim.fn.has('nvim-0.9') == 1 and 'statuscolumn=' or '',
13761377
'synmaxcol&',
13771378
-- Differ from 'vim-startify'
13781379
'buftype=nofile',

tests/test_starter.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,22 +172,23 @@ T['open()']['works'] = function()
172172
expect.match(table.concat(get_lines(), '\n'), 'Builtin actions')
173173
end
174174

175-
T['open()']['sets buffer options'] = function()
175+
T['open()']['sets local options'] = function()
176176
-- Cache initial data for future verification
177177
child.o.showtabline = 2
178178
local init_laststatus = child.o.laststatus
179179

180180
-- Open Starter buffer
181181
child.lua('MiniStarter.open()')
182182

183-
-- Should set essential buffer options (not all actually set are tested)
183+
-- Should set essential local options (not all actually set are tested)
184184
eq(child.bo.bufhidden, 'wipe')
185185
eq(child.bo.buflisted, false)
186186
eq(child.bo.buftype, 'nofile')
187+
eq(child.wo.colorcolumn, '')
187188
eq(child.wo.foldlevel, 999)
188189
eq(child.bo.modifiable, false)
189-
eq(child.wo.colorcolumn, '')
190190
eq(child.wo.signcolumn, 'no')
191+
if child.fn.has('nvim-0.9') == 1 then eq(child.wo.statuscolumn, '') end
191192
eq(child.wo.wrap, false)
192193

193194
-- Should hide tabline but not touch statusline

0 commit comments

Comments
 (0)