aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/util.lua
diff options
context:
space:
mode:
authorMathias Fußenegger <mfussenegger@users.noreply.github.com>2022-08-08 13:02:15 +0200
committerGitHub <noreply@github.com>2022-08-08 13:02:15 +0200
commita46e6afb8b95229478c5c1fb75e3f1c55991def0 (patch)
treefa7f1ce47471066356292253b77c68a233c9dcab /runtime/lua/vim/lsp/util.lua
parent2d5fce2cdb1254391481a1603be7bfb0872044a5 (diff)
downloadrneovim-a46e6afb8b95229478c5c1fb75e3f1c55991def0.tar.gz
rneovim-a46e6afb8b95229478c5c1fb75e3f1c55991def0.tar.bz2
rneovim-a46e6afb8b95229478c5c1fb75e3f1c55991def0.zip
fix(lsp): set end_col in formatexpr (#19676)
The last line was excluded from formatting via formatexpr because the character in the params was set to 0 instead of the end of line.
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r--runtime/lua/vim/lsp/util.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
index eac21db386..283099bbcf 100644
--- a/runtime/lua/vim/lsp/util.lua
+++ b/runtime/lua/vim/lsp/util.lua
@@ -113,7 +113,7 @@ end
--- Convert byte index to `encoding` index.
--- Convenience wrapper around vim.str_utfindex
---@param line string line to be indexed
----@param index number byte index (utf-8), or `nil` for length
+---@param index number|nil byte index (utf-8), or `nil` for length
---@param encoding string utf-8|utf-16|utf-32|nil defaults to utf-16
---@return number `encoding` index of `index` in `line`
function M._str_utfindex_enc(line, index, encoding)