dashboard-nvim
                                
                                
                                
                                    dashboard-nvim copied to clipboard
                            
                            
                            
                        getting an error when opening nvim-tree while using cat or lolcat to display the header
Describe the bug i'm getting an error when opening nvim-tree to browse my files when i'm using cat or lolcat to display the header.
To Reproduce Steps to reproduce the behavior:
- use a config like this that uses cat or lolcat to display the output:
 
require("dashboard").setup(
    {
        theme = 'hyper',
        config = {
            packages = {enabled=false},
            project = {enable=false},
            mru = {limit=20},
            footer = {
                "",
                "Live",
                "Not for yourself",
                "But for her."
            },
        },
        preview = {
            command = "lolcat",
            file_path = "~/.config/nvim/lua/_plugins_/karambit-lighter.txt",
            file_height = 19,
            file_width = 59,
        }
    }
)
- open up nvim tree
 - See error:
 
Error detected while processing WinResized Autocommands for "*":
Error executing lua callback: ...re/nvim/plugged/dashboard-nvim/lua/dashboard/preview.lua:71: attempt to index field 'col' (a number value)                                                                                                    
stack traceback:                                                                                                                                                                                                                               
        ...re/nvim/plugged/dashboard-nvim/lua/dashboard/preview.lua:71: in function 'refresh_preview_wincol'                                                                                                                                   
        ...re/nvim/plugged/dashboard-nvim/lua/dashboard/preview.lua:82: in function <...re/nvim/plugged/dashboard-nvim/lua/dashboard/preview.lua:81>                                                                                           
Press ENTER or type command to continue                                                                                                                                           
and if i press esc and try to use it, the header gets messes up. ik the header is another buffer because i can go to the header and open up another file like this:
but it doesn't change the position properly as you can see: