From 14e524cf217250388d374433cf6f3241f66e4e01 Mon Sep 17 00:00:00 2001
From: mitchell <70453897+orbitalquark@users.noreply.github.com>
Date: Sat, 19 Sep 2020 14:53:20 -0400
Subject: Added `events.FILE_{BEFORE,AFTER}_RELOAD` and save/restore bookmarks.
Also moved buffer state save/restore into ui module.
---
docs/api.md | 14 ++++++++++++++
1 file changed, 14 insertions(+)
(limited to 'docs/api.md')
diff --git a/docs/api.md b/docs/api.md
index e57c9b7c..99ca01ac 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -3060,6 +3060,8 @@ Parameters:
#### `buffer.reload`(*buffer*)
Reloads the buffer's file contents, discarding any changes.
+Emits `FILE_BEFORE_RELOAD` and `FILE_AFTER_RELOAD` events if the buffer is
+the current one.
Parameters:
@@ -4306,6 +4308,12 @@ Extends Lua's `io` library with Textadept functions for working with files.
### Fields defined by `io`
+
+#### `events.FILE_AFTER_RELOAD` (string)
+
+Emitted after reloading the current file.
+ Emitted by [`buffer:reload()`](#buffer.reload).
+
#### `events.FILE_AFTER_SAVE` (string)
@@ -4317,6 +4325,12 @@ Emitted right after saving a file to disk.
* _`saved_as`_: Whether or not the file was saved under a different
filename.
+
+#### `events.FILE_BEFORE_RELOAD` (string)
+
+Emitted before reloading the current file.
+ Emitted by [`buffer:reload()`](#buffer.reload).
+
#### `events.FILE_BEFORE_SAVE` (string)
--
cgit v1.2.3