Skip to content

Commit

Permalink
fix(renderer): Fixed incorrect overlay text position of inline elements
Browse files Browse the repository at this point in the history
Before:
  ■ Text
   ├┤     Left side
   ├───┤  Overlay text

Now:
  ■ Text
   ├┤     Left side
    ├──┤  Overlay text

Closes #9
  • Loading branch information
OXY2DEV committed Aug 19, 2024
1 parent c5e6446 commit 7795341
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/helpview/renderer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ renderer.component_renderer = function (buffer, data, config_table)
});

if config_table.hl then
vim.api.nvim_buf_set_extmark(buffer, renderer.namespace, data.row_start, data.col_start, {
vim.api.nvim_buf_set_extmark(buffer, renderer.namespace, data.row_start, conceal_before and data.col_start + conceal_before or data.col_start, {
virt_text_pos = "overlay",
virt_text = {
{ data.text, renderer.set_hl(config_table.hl) }
Expand Down

0 comments on commit 7795341

Please sign in to comment.