Skip to content

Error when mapping action to <backspace> #156

Description

@heynemann

Describe the bug

When adding action to call a function when <backspace> is pressed. I get an error:

Error detected while processing function nnn#select_action:
line    6:
E728: Using a Dictionary as a Number

To Reproduce

Add this config on top of nnn.vim:

function! QuitNNN()
    execute('normal! q')
endfunction

let g:nnn#action = { '<backspace>': funcref('QuitNNN') }
  1. Open vim
  2. Press key n
  3. Press key
  4. See error

Expected behavior

Should call my function (and in turn close explorer).

Environment:

  • OS: macos
  • Terminal: iterm2
  • Shell: zsh
  • Vim version: vim 8
  • Plugin manager: vim-plug
  • Plugin version: master
  • Nnn version: latest on brew

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions