-
Notifications
You must be signed in to change notification settings - Fork 42
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
Can't find buffer number from Buffer
#138
Comments
There's currently no public method to get the inner |
I need it to call another vim function that uses the buffer id let buffer = create_buf(true, false)?;
let buf_nbr: Object = buffer.clone().into();
let buf_nbr = unsafe { buf_nbr.as_integer_unchecked() as i32 };
let vim: LuaTable = lua.globals().get("vim")?;
let api: LuaTable = vim.get("api")?;
let set_buf_keymap: LuaFunction = api.get("nvim_buf_set_keymap")?;
let result = set_buf_keymap.call::<_, ()>((buf_nbr, mode, key, rhs, options)); |
That's not necessary, we have bindings to all the |
Oh! Thank you! And thank you for nvim oxi, you rock! ❤️ |
Hello, I just got upon something I cannot handle really easily because I don't have access to the buffer id. I'm making a plugin that needs to store the opened buffer it created. There may be a workaround but I cannot find it. |
Closed by #176. |
Hey! Me again, It's hard to get the buffer number from a
Buffer
. I did this:But I guess that we could have a the id directly from the
Buffer
struct. Am I missing something?The text was updated successfully, but these errors were encountered: