diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-09-20 13:42:37 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2023-09-22 13:48:46 +0200 |
commit | 3a7cb72dcbe4aaaed47999ab5afaf3d1cb8d4df8 (patch) | |
tree | 534581de3060c6c2ed9d000636a27295295e653e /runtime/lua/vim/secure.lua | |
parent | b7763d7f6b7fdcabe06658c664457df8bc147563 (diff) | |
download | rneovim-3a7cb72dcbe4aaaed47999ab5afaf3d1cb8d4df8.tar.gz rneovim-3a7cb72dcbe4aaaed47999ab5afaf3d1cb8d4df8.tar.bz2 rneovim-3a7cb72dcbe4aaaed47999ab5afaf3d1cb8d4df8.zip |
refactor(grid): properly namespace and separate stateful grid functions
This is a step in an ongoing refactor where the "grid_puts" and
"grid_put_linebuf" code paths will share more of the implementation (in
particular for delta calculation, doublewidth and 'arabicshape'
handling). But it also makes sense by its own as a cleanup, and is thus
committed separately.
Before this change many of the low level grid functions grid_puts,
grid_fill etc could both be used in a standalone fashion but also as
part of a batched line update which would be finally transmitted as a
single grid_line call (via ui_line() ). This was initially useful to
quickly refactor pre-existing vim code to use batched logic safely.
However, this pattern is not really helpful for maintainable and newly
written code, where the "grid" and "row" arguments are just needlessly
repeated. This simplifies these calls to just use grid and row as
specified in the initial grid_line_start(grid, row) call.
This also makes the intent clear whether any grid_puts() call is actually
part of a batch or not, which is better in the long run when more things
get refactored to use effective (properly batched) updates.
Diffstat (limited to 'runtime/lua/vim/secure.lua')
0 files changed, 0 insertions, 0 deletions