Skip to content

E728 in fzf#vim#colors() when first arg is a dictionary #1610

@MenkeTechnologies

Description

@MenkeTechnologies

Bug

fzf#vim#colors() throws E728: Using a Dictionary as a Number on line 614 of autoload/fzf/vim.vim when called with a spec dict as the first argument.

Cause

if !a:1 " We can't set up IPC in fullscreen mode in Vim

This assumes a:1 is always a number (<bang>0 from the :Colors command), but the function's public API accepts ([spec dict], [fullscreen bool]) — so a:1 can be a dictionary.

Steps to reproduce

:call fzf#vim#colors({})

Suggested fix

if a:0 && type(a:1) != s:TYPE.dict && !a:1

This matches how s:fzf() (line 322) already handles the same varargs pattern.

Version

Latest master (34a564c81f)

Introduced in 04bfa81157 ([Colors] Change color scheme on the fly (experimental)).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions