Skip to content

Commit 0cdb7ba

Browse files
committed
skip render empty lines with blank
Users may want to know whether the corresponding line has spaces, but the current implementation unconditionally renders blanks based on indentation. Signed-off-by: yuguorui <yuguorui@pku.edu.cn>
1 parent 2103a71 commit 0cdb7ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/hlchunk/mods/blank.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function blank_mod:render_line(index, indent)
4646
local char = line_val:sub(shiftwidth * i - 1, shiftwidth * i - 1)
4747
if char == "\t" then
4848
text = text .. ("t") .. (" "):rep(shiftwidth - 1)
49-
else
49+
elseif char ~= "" then
5050
text = text .. "." .. (" "):rep(shiftwidth - 1)
5151
end
5252
end

0 commit comments

Comments
 (0)