aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/diff.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-09-20 10:08:05 +0200
committerbfredl <bjorn.linse@gmail.com>2023-09-29 15:38:25 +0200
commite33269578b5bea2528cc48afc5b009eb8d4ad1d6 (patch)
tree7f96465b64cd638d0b247932e7075a8ea587faf2 /src/nvim/diff.c
parentaf7d317f3ff31d5ac5d8724b5057a422e1451b54 (diff)
downloadrneovim-e33269578b5bea2528cc48afc5b009eb8d4ad1d6.tar.gz
rneovim-e33269578b5bea2528cc48afc5b009eb8d4ad1d6.tar.bz2
rneovim-e33269578b5bea2528cc48afc5b009eb8d4ad1d6.zip
refactor(grid): unify the two put-text-on-the-screen code paths
The screen grid refactors will continue until morale improves. Jokes aside, this is quite a central installment in the series. Before this refactor, there were two fundamentally distinct codepaths for getting some text on the screen: - the win_line() -> grid_put_linebuf() -> ui_line() call chain used for buffer text, with linebuf_char as a temporary scratch buffer - the grid_line_start/grid_line_puts/grid_line_flush() -> ui_line() path used for every thing else: statuslines, messages and the command line. Here the grid->chars[] array itself doubles as a scratch buffer. With this refactor, the later family of functions still exist, however they now as well render to linebuf_char just like win_line() did, and grid_put_linebuf() is called in the end to calculate delta changes. This means we don't need any duplicate logic for delta calculations anymore. Later down the line, it will be possible to share more logic operating on this scratch buffer, like doing 'rightleft' reversal and arabic shaping as a post-processing step.
Diffstat (limited to 'src/nvim/diff.c')
0 files changed, 0 insertions, 0 deletions