From 3f6bc34e663c62bc8899dcdc65bf204b2ccfdaec Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 24 Sep 2024 04:46:50 -0700 Subject: docs: lua error patterns #30240 Co-authored-by: Mathias Fussenegger Co-authored-by: Ananth Bhaskararaman --- runtime/lua/vim/_editor.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'runtime/lua/vim/_editor.lua') diff --git a/runtime/lua/vim/_editor.lua b/runtime/lua/vim/_editor.lua index 7b5570cc99..cb864bd974 100644 --- a/runtime/lua/vim/_editor.lua +++ b/runtime/lua/vim/_editor.lua @@ -208,8 +208,10 @@ vim.inspect = vim.inspect do local tdots, tick, got_line1, undo_started, trailing_nl = 0, 0, false, false, false - --- Paste handler, invoked by |nvim_paste()| when a conforming UI - --- (such as the |TUI|) pastes text into the editor. + --- Paste handler, invoked by |nvim_paste()|. + --- + --- Note: This is provided only as a "hook", don't call it directly; call |nvim_paste()| instead, + --- which arranges redo (dot-repeat) and invokes `vim.paste`. --- --- Example: To remove ANSI color codes when pasting: --- -- cgit v1.3-3-g829e