Skip to content

fix: error when passing bufnr to popup.create() #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 12, 2020
Merged

fix: error when passing bufnr to popup.create() #3

merged 1 commit into from
Dec 12, 2020

Conversation

tamago324
Copy link
Contributor

Hi.
I use it when I write popup scripts. Thank you very much 😍

I got an error when I passed the buffer number, so I fixed it.

init.vim

set encoding=utf-8

filetype plugin indent on
if has('vim_starting')
  let s:pluin_manager_dir='~/.config/nvim/.plugged/vim-plug'
  execute 'set runtimepath+=' . s:pluin_manager_dir
endif
call plug#begin('~/.config/nvim/.plugged')
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
call plug#end()

language messages en_US.utf8

lua << EOF
local popup = require 'popup'

popup.create(vim.fn.bufnr(), {
    col = 1,
    line = 1,
    minwidth = 10,
    minheight = 10,
})
EOF

Errors that occur

Error detected while processing /tmp/init.vim:
line   32:
E5108: Error executing lua ...o324/.config/nvim/.plugged/popup.nvim/lua/popup/init.lua:165: bad argument #1 to 'ipairs' (table expected, got number)

I hope you can merge them when you have time!

@tjdevries
Copy link
Member

Makes sense to me! Thanks!

@tjdevries tjdevries merged commit 6f8f4cf into nvim-lua:master Dec 12, 2020
@tamago324
Copy link
Contributor Author

Thank you for merging!

@tamago324 tamago324 deleted the fix-popup-create-bufnr branch December 12, 2020 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants