summaryrefslogtreecommitdiff
path: root/ted.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-07 07:19:56 -0400
committerpommicket <pommicket@gmail.com>2023-08-07 07:19:56 -0400
commitb146279b48f6a4f4bea8946cb3f0f1f5cc5a9985 (patch)
tree70069f2f622f3b6190fa1effcfb9ce9e14d8f94b /ted.h
parentbdbce6fe3c647616d22867bbc82e011c91231dd3 (diff)
handle more complicated renames
Diffstat (limited to 'ted.h')
-rw-r--r--ted.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/ted.h b/ted.h
index 0551eb2..4199767 100644
--- a/ted.h
+++ b/ted.h
@@ -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