aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r--runtime/lua/vim/_meta/options.lua6
-rw-r--r--runtime/lua/vim/_meta/vimfn.lua26
-rw-r--r--runtime/lua/vim/lsp/util.lua5
3 files changed, 19 insertions, 18 deletions
diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua
index 6ef3cf57e1..ed0d844748 100644
--- a/runtime/lua/vim/_meta/options.lua
+++ b/runtime/lua/vim/_meta/options.lua
@@ -5113,9 +5113,9 @@ vim.o.scbk = vim.o.scrollback
vim.bo.scrollback = vim.o.scrollback
vim.bo.scbk = vim.bo.scrollback
---- See also `scroll-binding`. When this option is set, the current
---- window scrolls as other scrollbind windows (windows that also have
---- this option set) scroll. This option is useful for viewing the
+--- See also `scroll-binding`. When this option is set, scrolling the
+--- current window also scrolls other scrollbind windows (windows that
+--- also have this option set). This option is useful for viewing the
--- differences between two versions of a file, see 'diff'.
--- See `'scrollopt'` for options that determine how this option should be
--- interpreted.
diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua
index 6686661a27..86e8781160 100644
--- a/runtime/lua/vim/_meta/vimfn.lua
+++ b/runtime/lua/vim/_meta/vimfn.lua
@@ -6238,55 +6238,55 @@ function vim.fn.prevnonblank(lnum) end
--- echo printf("%1$*2$.*3$f", 1.4142135, 6, 2)
--- < 1.41
---
---- *E1400*
+--- *E1500*
--- You cannot mix positional and non-positional arguments: >vim
--- echo printf("%s%1$s", "One", "Two")
---- < E1400: Cannot mix positional and non-positional
+--- < E1500: Cannot mix positional and non-positional
--- arguments: %s%1$s
---
---- *E1401*
+--- *E1501*
--- You cannot skip a positional argument in a format string: >vim
--- echo printf("%3$s%1$s", "One", "Two", "Three")
---- < E1401: format argument 2 unused in $-style
+--- < E1501: format argument 2 unused in $-style
--- format: %3$s%1$s
---
---- *E1402*
+--- *E1502*
--- You can re-use a [field-width] (or [precision]) argument: >vim
--- echo printf("%1$d at width %2$d is: %01$*2$d", 1, 2)
--- < 1 at width 2 is: 01
---
--- However, you can't use it as a different type: >vim
--- echo printf("%1$d at width %2$ld is: %01$*2$d", 1, 2)
---- < E1402: Positional argument 2 used as field
+--- < E1502: Positional argument 2 used as field
--- width reused as different type: long int/int
---
---- *E1403*
+--- *E1503*
--- When a positional argument is used, but not the correct number
--- or arguments is given, an error is raised: >vim
--- echo printf("%1$d at width %2$d is: %01$*2$.*3$d", 1, 2)
---- < E1403: Positional argument 3 out of bounds:
+--- < E1503: Positional argument 3 out of bounds:
--- %1$d at width %2$d is: %01$*2$.*3$d
---
--- Only the first error is reported: >vim
--- echo printf("%01$*2$.*3$d %4$d", 1, 2)
---- < E1403: Positional argument 3 out of bounds:
+--- < E1503: Positional argument 3 out of bounds:
--- %01$*2$.*3$d %4$d
---
---- *E1404*
+--- *E1504*
--- A positional argument can be used more than once: >vim
--- echo printf("%1$s %2$s %1$s", "One", "Two")
--- < One Two One
---
--- However, you can't use a different type the second time: >vim
--- echo printf("%1$s %2$s %1$d", "One", "Two")
---- < E1404: Positional argument 1 type used
+--- < E1504: Positional argument 1 type used
--- inconsistently: int/string
---
---- *E1405*
+--- *E1505*
--- Various other errors that lead to a format string being
--- wrongly formatted lead to: >vim
--- echo printf("%1$d at width %2$d is: %01$*2$.3$d", 1, 2)
---- < E1405: Invalid format specifier:
+--- < E1505: Invalid format specifier:
--- %1$d at width %2$d is: %01$*2$.3$d
---
--- @param fmt any
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
index 0d1e3cc0d1..51ed87219c 100644
--- a/runtime/lua/vim/lsp/util.lua
+++ b/runtime/lua/vim/lsp/util.lua
@@ -168,10 +168,12 @@ end
local _str_utfindex_enc = M._str_utfindex_enc
local _str_byteindex_enc = M._str_byteindex_enc
+
--- Replaces text in a range with new text.
---
--- CAUTION: Changes in-place!
---
+---@deprecated
---@param lines (table) Original list of strings
---@param A (table) Start position; a 2-tuple of {line,col} numbers
---@param B (table) End position; a 2-tuple of {line,col} numbers
@@ -320,9 +322,7 @@ local function get_line(bufnr, row)
end
--- Position is a https://microsoft.github.io/language-server-protocol/specifications/specification-current/#position
---- Returns a zero-indexed column, since set_lines() does the conversion to
---@param offset_encoding string|nil utf-8|utf-16|utf-32
---- 1-indexed
---@return integer
local function get_line_byte_from_position(bufnr, position, offset_encoding)
-- LSP's line and characters are 0-indexed
@@ -1991,6 +1991,7 @@ end
---
--- CAUTION: Modifies the input in-place!
---
+---@deprecated
---@param lines table list of lines
---@return string filetype or "markdown" if it was unchanged.
function M.try_trim_markdown_code_blocks(lines)