aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/func.lua
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-05-28 12:52:24 +0200
committerbfredl <bjorn.linse@gmail.com>2024-05-30 11:40:02 +0200
commit064483a2b4a3056baf8eee4424bb81127e531991 (patch)
treec19d074d81b882570be4c82413e13d6c4f02eec4 /runtime/lua/vim/func.lua
parentf55767afe28a7d90421b97af88e18e2828ed9c01 (diff)
downloadrneovim-064483a2b4a3056baf8eee4424bb81127e531991.tar.gz
rneovim-064483a2b4a3056baf8eee4424bb81127e531991.tar.bz2
rneovim-064483a2b4a3056baf8eee4424bb81127e531991.zip
refactor(fileio): use a linear buffer for FileDescriptor
Using a ring buffer for buffered synchronous fileio is just unnecessary complexity. - when reading, we always consume the _entire_ buffer before getting into syscalls. Thus we reset the buffer to its initial position before when we actually read. - when writing and buffer is full, we always flush the entire buffer before starting to buffer again. So we can reset the buffer to its initial state. Also no static buffers are needed for writing and skipping. Needing an extra copy for each write completely defeated the purpose of a ring buffer (if there had been one)
Diffstat (limited to 'runtime/lua/vim/func.lua')
0 files changed, 0 insertions, 0 deletions