From cde94598ed08c35341f4251dd2a0111ef52b338d Mon Sep 17 00:00:00 2001 From: Lee Wannacott Date: Sun, 7 Mar 2021 00:06:13 +1300 Subject: [PATCH 1/3] Clarify that nvim_put()'s {after} and {follow} parameters expect boolean values true, or false. --- runtime/doc/api.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index fdc41af1d5..e7ff6db692 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -1416,8 +1416,9 @@ nvim_put({lines}, {type}, {after}, {follow}) *nvim_put()* • "l" |linewise| mode • "" guess by contents, see |setreg()| {after} Insert after cursor (like |p|), or before (like - |P|). - {follow} Place cursor at end of inserted text. + |P|). Expects boolean value: true, or false. + {follow} Place cursor at end of inserted text. Expects + boolean value true, or false. *nvim_replace_termcodes()* nvim_replace_termcodes({str}, {from_part}, {do_lt}, {special}) From ea99e7f2abd0ab6318f46d098c34ecc4107ace4d Mon Sep 17 00:00:00 2001 From: Lee Wannacott Date: Sun, 7 Mar 2021 00:31:58 +1300 Subject: [PATCH 2/3] Forgot to add colon to the {follow} parameters statement --- runtime/doc/api.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index e7ff6db692..107f7153bf 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -1418,7 +1418,7 @@ nvim_put({lines}, {type}, {after}, {follow}) *nvim_put()* {after} Insert after cursor (like |p|), or before (like |P|). Expects boolean value: true, or false. {follow} Place cursor at end of inserted text. Expects - boolean value true, or false. + boolean value: true, or false. *nvim_replace_termcodes()* nvim_replace_termcodes({str}, {from_part}, {do_lt}, {special}) From d8dff33e4be1288f675256db3257d3de0da0daed Mon Sep 17 00:00:00 2001 From: Lee Wannacott Date: Sun, 7 Mar 2021 00:54:13 +1300 Subject: [PATCH 3/3] Added If true to show that {after} and {follow} parameters of nvim_put() are expecting boolean values --- runtime/doc/api.txt | 7 +++---- src/nvim/api/vim.c | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 107f7153bf..bd34411065 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -1415,10 +1415,9 @@ nvim_put({lines}, {type}, {after}, {follow}) *nvim_put()* • "c" |charwise| mode • "l" |linewise| mode • "" guess by contents, see |setreg()| - {after} Insert after cursor (like |p|), or before (like - |P|). Expects boolean value: true, or false. - {follow} Place cursor at end of inserted text. Expects - boolean value: true, or false. + {after} If true insert after cursor (like |p|), or before (like + |P|). + {follow} If true place cursor at end of inserted text. *nvim_replace_termcodes()* nvim_replace_termcodes({str}, {from_part}, {do_lt}, {special}) diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index b94c99dc5e..586123aac1 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -1546,8 +1546,8 @@ theend: /// - "c" |charwise| mode /// - "l" |linewise| mode /// - "" guess by contents, see |setreg()| -/// @param after Insert after cursor (like |p|), or before (like |P|). -/// @param follow Place cursor at end of inserted text. +/// @param after If true insert after cursor (like |p|), or before (like |P|). +/// @param follow If true place cursor at end of inserted text. /// @param[out] err Error details, if any void nvim_put(ArrayOf(String) lines, String type, Boolean after, Boolean follow, Error *err)