aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/api')
-rw-r--r--src/nvim/api/buffer.c5
-rw-r--r--src/nvim/api/vim.c10
2 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c
index b345dcaccd..8e61976c4b 100644
--- a/src/nvim/api/buffer.c
+++ b/src/nvim/api/buffer.c
@@ -42,6 +42,8 @@
/// \defgroup api-buffer
///
+/// \brief For more information on buffers, see |buffers|
+///
/// Unloaded Buffers:~
///
/// Buffers may be unloaded by the |:bunload| command or the buffer's
@@ -126,6 +128,7 @@ String buffer_get_line(Buffer buffer, Integer index, Error *err)
/// @param opts Optional parameters.
/// - on_lines: Lua callback invoked on change.
/// Return `true` to detach. Args:
+/// - the string "lines"
/// - buffer handle
/// - b:changedtick
/// - first line that changed (zero-indexed)
@@ -136,9 +139,11 @@ String buffer_get_line(Buffer buffer, Integer index, Error *err)
/// - deleted_codeunits (if `utf_sizes` is true)
/// - on_changedtick: Lua callback invoked on changedtick
/// increment without text change. Args:
+/// - the string "changedtick"
/// - buffer handle
/// - b:changedtick
/// - on_detach: Lua callback invoked on detach. Args:
+/// - the string "detach"
/// - buffer handle
/// - utf_sizes: include UTF-32 and UTF-16 size of the replaced
/// region, as args to `on_lines`.
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index 40cef87cf0..d6f95c7a5f 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -203,6 +203,16 @@ Integer nvim_get_hl_id_by_name(String name)
/// flags. This is a blocking call, unlike |nvim_input()|.
///
/// On execution error: does not fail, but updates v:errmsg.
+//
+// If you need to input sequences like <C-o> use nvim_replace_termcodes
+// to replace the termcodes and then pass the resulting string to
+// nvim_feedkeys. You'll also want to enable escape_csi.
+///
+/// Example:
+/// <pre>
+/// :let key = nvim_replace_termcodes("<C-o>", v:true, v:false, v:true)
+/// :call nvim_feedkeys(key, 'n', v:true)
+/// </pre>
///
/// @param keys to be typed
/// @param mode behavior flags, see |feedkeys()|