String cannot contain newlines
teto opened this issue · comments
Please select which platform you are using.
Linux
Was this something which used to work for you, and then stopped?
I never saw this working
Describe the bug
with the latest code
E5108: Error executing lua ...pack/home-manager/start/registers.nvim/lua/registers.lua:187: String cannot contain newlines
stack traceback:
[C]: in function 'nvim_buf_set_lines'
...pack/home-manager/start/registers.nvim/lua/registers.lua:187: in function 'update_view'
...pack/home-manager/start/registers.nvim/lua/registers.lua:380: in function 'registers'
and neovim 0.7-dev (012c055804876346a3ef5c1d0cdb8e0a7ee58481) but it has been failing ever since I've installed this plugin a few months ago I think.
Thanks for the report, do you have any registers.nvim specific configuration?
ha sorry I had some configuration I had forgotten about, I dont remember how I set it, I've apparently copy/pasted some defaults:
let g:registers_return_symbol = "\n" "'⏎' by default
let g:registers_tab_symbol = "\t" "'·' by default
let g:registers_space_symbol = "." "' ' by default
let g:registers_delay = 500 "0 by default, milliseconds to wait before opening the popup window
let g:registers_register_key_sleep = 1 "0 by default, seconds to wait before closing the window when a register key is pressed
let g:registers_show_empty_registers = 0 "1 by default, an additional line with the registers without content
let g:registers_trim_whitespace = 0 "1 by default, don't show whitespace at the begin and end of the registers
let g:registers_hide_only_whitespace = 1 "0 by default, don't show registers filled exclusively with whitespace
let g:registers_window_border = "single" "'none' by default, can be 'none', 'single','double', 'rounded', 'solid', or 'shadow' (requires Neovim 0.5.0+)
let g:registers_window_min_height = 10 "3 by default, minimum height of the window when there is the cursor at the bottom
let g:registers_window_max_width = 20 "100 by default, maximum width of the window
If I remove this config, it seems to works better but pasting the text with autoindent results in some tricky things. I will try without any customization.
This line is the problem I think:
let g:registers_return_symbol = "\n" "'⏎' by default
I should probably remove it from the README, can you verify that if you remove that line it works?