···2424 callback = function()
2525 -- TODO: this function can be expanded to incorporate other registers
2626 -- - use vim.v.event.regname and an allowlist
2727+ -- local reg_type = vim.v.event.operator
2728 -- if reg_type == "y" or reg_type == "d" then
2829 -- local yanked_text = vim.fn.getreg('"')
29303031 -- get register information
3131- local reg_type = vim.v.event.operator
3232 local rn = vim.v.event.regname
33333434 -- check changes wwere made to default register
+2-2
lua/yankbank/menu.lua
···5353 -- FIX: long enough entries will cause window to go below end of screen
5454 -- FIX: wrapping long lines will cause entries below to not show in menu (requires scrolling to see)
5555 local width =
5656- math.min(max_width + 4, vim.api.nvim_get_option_value("columns", {}))
5656+ math.min(max_width, vim.api.nvim_get_option_value("columns", {}) - 4)
5757 local height = math.min(
5858 display_lines and #display_lines or 1,
5959- vim.api.nvim_get_option_value("lines", {})
5959+ vim.api.nvim_get_option_value("lines", {}) - 10
6060 )
61616262 -- open window