File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed
Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ local function mru_list(config)
189189 for _ , file in pairs (vim .list_slice (mlist , 1 , config .mru .limit )) do
190190 local filename = vim .fn .fnamemodify (file , ' :t' )
191191 local icon , group = utils .get_icon (filename )
192- icon = icon or ' '
192+ icon = icon or ' '
193193 if config .mru .cwd_only then
194194 file = vim .fn .fnamemodify (file , ' :.' )
195195 elseif not utils .is_win then
@@ -405,14 +405,16 @@ local function gen_center(plist, config)
405405
406406 for i , data in pairs (mgroups ) do
407407 local len , group = unpack (data )
408- api .nvim_buf_add_highlight (
409- config .bufnr ,
410- 0 ,
411- group ,
412- first_line + i + plist_len ,
413- start_col ,
414- start_col + len
415- )
408+ if group then
409+ api .nvim_buf_add_highlight (
410+ config .bufnr ,
411+ 0 ,
412+ group ,
413+ first_line + i + plist_len ,
414+ start_col ,
415+ start_col + len
416+ )
417+ end
416418 api .nvim_buf_add_highlight (
417419 config .bufnr ,
418420 0 ,
Original file line number Diff line number Diff line change 6464function utils .get_icon (filename )
6565 local ok , devicons = pcall (require , ' nvim-web-devicons' )
6666 if not ok then
67- vim .notify (' [dashboard.nvim] not found nvim-web-devicons' )
6867 return nil
6968 end
7069 return devicons .get_icon (filename , nil , { default = true })
You can’t perform that action at this time.
0 commit comments