mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 19:25:11 -07:00
66ac327db2
We do not need an enum to keep track of what place in win_line() we currently are at. We already have a variable which keeps track where in the code we currently are (and thus what part of the line we are currently rendering), it is called the _program counter_. When we need non-linear or self-referential control-flow anyway for a laugh, we have a mechanism for that, it is called _function calls_. Do not "save" and "restore" the wlv->n_extra state every time the columns are to be drawn. This sort of thing needs to go away. Instead of setting the n_extra variables and then going to the outer while loop, the text in the columns can be rendered by just simply putting the text into the cells of the screen line, right away. Even in nvim this can be tricky sometimes, luckily we can use function calls to abstract this logic, which means that this handy data structure called the _call stack_ is handling saving away state temporarily, and restoring it back when we need it again. Lastly, but not least, as we now have direct control how signs are rendered, these can be stored as schar_T[2] and be directly put on screen as such. |
||
---|---|---|
.. | ||
api | ||
autocmd | ||
core | ||
editor | ||
ex_cmds | ||
fixtures | ||
legacy | ||
lua | ||
options | ||
plugin | ||
provider | ||
shada | ||
terminal | ||
treesitter | ||
ui | ||
vimscript | ||
example_spec.lua | ||
helpers.lua | ||
preload.lua |