diff options
author | pommicket <pommicket@gmail.com> | 2023-08-07 07:19:56 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-08-07 07:19:56 -0400 |
commit | b146279b48f6a4f4bea8946cb3f0f1f5cc5a9985 (patch) | |
tree | 70069f2f622f3b6190fa1effcfb9ce9e14d8f94b /ted.h | |
parent | bdbce6fe3c647616d22867bbc82e011c91231dd3 (diff) |
handle more complicated renames
Diffstat (limited to 'ted.h')
-rw-r--r-- | ted.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -973,8 +973,14 @@ void ted_path_full(Ted *ted, const char *relpath, char *abspath, size_t abspath_ void ted_reset_active_buffer(Ted *ted); /// set ted's error message to the buffer's error. void ted_error_from_buffer(Ted *ted, TextBuffer *buffer); -/// Returns the buffer containing the file at `path`, or NULL if there is none. +/// Returns the buffer containing the file at absolute path `path`, or NULL if there is none. TextBuffer *ted_get_buffer_with_file(Ted *ted, const char *path); +/// close this buffer, discarding unsaved changes. +void ted_close_buffer(Ted *ted, TextBuffer *buffer); +/// close buffer with this absolute path, discarding unsaved changes. +/// +/// returns true if the buffer was actually present. +bool ted_close_buffer_with_file(Ted *ted, const char *path); /// save all buffers bool ted_save_all(Ted *ted); /// reload all buffers from their files |