How to read from a buffer that has no file backing
1 year, 3 months ago
on April 4, 2019, 12:55 p.m.
Reason: Initial post
I use cmake for my build system and I'm trying to hack in a cmake formatter into 4coder. Currently, I am calling exec_system_command to call the cmake-format python script on the target file and it outputs the formatted text into an output 4coder buffer that has no file backing. I now want to copy the contents from this 4coder buffer to the target file buffer but I am not sure how. I tried calling get_buffer after the exec_system_command call and the returned size from the buffer summary is still 0. I tried manually ready 4 bytes or so with buffer_read_range and it seems to read in 0 bytes anyway.