Fix padding
This commit is contained in:
parent
193d7fbd57
commit
0778dbca64
@ -406,12 +406,12 @@ function WrapContext:config_opt()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function WrapContext:config_indent(line)
|
function WrapContext:config_indent(line)
|
||||||
local indent = #line:match('^(%s*)')
|
local padding = #line:match('^(%s*)')
|
||||||
if vim.o.expandtab then
|
if vim.o.expandtab then
|
||||||
self.indent_level = indent / vim.o.shiftwidth
|
self.indent_level = math.floor(padding / vim.o.shiftwidth)
|
||||||
self.indent_block = string.rep(' ', vim.o.shiftwidth)
|
self.indent_block = string.rep(' ', vim.o.shiftwidth)
|
||||||
else
|
else
|
||||||
self.indent_level = indent
|
self.indent_level = padding
|
||||||
self.indent_block = '\t'
|
self.indent_block = '\t'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user