@@ -56,7 +56,6 @@ M.show = function(line)
5656 local index = 1
5757 local str_length = #line
5858 local offset = -1
59− local is_end_key = true
6059 for i = col + 2, #line, 1 do
6160 local char = line:sub(i, i)
6261 local char2 = line:sub(i - 1, i)
@@ -74,11 +73,6 @@ M.show = function(line)
7473 offset = 0
7574 end
7675
77− if i == str_length then
78− is_end_key = false
79− key = config.end_key
80− offset = 0
81− end
8276 table.insert(
8377 list_pos,
8478 { col = i + offset, key = key, char = char, pos = i }
@@ -86,12 +80,10 @@ M.show = function(line)
8680 end
8781 end
8882
89− if is_end_key then
90− table.insert(
91− list_pos,
92− { col = str_length + 1, key = config.end_key, pos = str_length + 1 }
93− )
94− end
83+ table.insert(
84+ list_pos,
85+ { col = str_length + 1, key = config.end_key, pos = str_length + 1 }
86+ )
9587
9688 M.highlight_wrap(list_pos, row, col, #line)
9789 vim.defer_fn(function()