Skip to content

Commit f6cfe01

Browse files
committed
fix: use vim.hl if available
1 parent 0e62500 commit f6cfe01

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lua/nvim-surround/buffer.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,10 @@ M.highlight_selection = function(selection)
303303
return
304304
end
305305

306-
vim.highlight.range(
306+
-- Use the non-deprecated module if available.
307+
local highlight = vim.hl or vim.highlight
308+
309+
highlight.range(
307310
0,
308311
M.namespace.highlight,
309312
"NvimSurroundHighlight",

0 commit comments

Comments
 (0)