Currently inner canvas element has fixed size and user must manage width and height of <neovim-editor> component. This is because we must know lines and cols before starting nvim (otherwise it is needed to send vim_try_resize after nvim starting).
<neovim-editor> (includes inner <canvas>) is created
nvim process starts
<neovim-editor> is attached to DOM
Now the size must be specified because we can't know the element size before attaching it to DOM.
The sequence might be:
<neovim-editor> (includes inner <canvas>) is created
<neovim-editor> is attached to DOM
Get the size of inner <canvas> and calculate lines and cols
nvim process starts with the lines and cols
Starting process will be delayed until DOM is attached. I must check the start up time change to ensure this change has small impact to it.
Currently inner
canvas
element has fixed size and user must managewidth
andheight
of<neovim-editor>
component. This is because we must know lines and cols before startingnvim
(otherwise it is needed to sendvim_try_resize
after nvim starting).<neovim-editor>
(includes inner<canvas>
) is creatednvim
process starts<neovim-editor>
is attached to DOMNow the size must be specified because we can't know the element size before attaching it to DOM. The sequence might be:
<neovim-editor>
(includes inner<canvas>
) is created<neovim-editor>
is attached to DOM<canvas>
and calculate lines and colsnvim
process starts with the lines and colsStarting process will be delayed until DOM is attached. I must check the start up time change to ensure this change has small impact to it.