gphalkes / tilde

The Tilde text editor
395 stars 21 forks source link

split windows on the same file buffer should be possible (feature request) #108

Open CharlesJQuarra opened 1 year ago

CharlesJQuarra commented 1 year ago

I noticed that when doing H/V split, a buffer cannot be shared by multiple windows/panes/views

I saw that here, the split_t::split just needs a window, which is implemented down here, my take here is that it should be possible to implement or modify file_edit_window_t such that instead of relying on an owning reference to file_buffer_t, it should instead rely on a borrowed reference to a (still unimplemented) file_buffer_view_t, such that multiple file buffer views can serialize writes to the same file buffer, and possibly notify other views, or their clients

Are there any other issues that might block this solution? I could devote some time to create a PR, but would be great if I had some guidance on this