Skip to content

Commit

Permalink
fix: Correct leading space calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Ferrier committed Aug 17, 2022
1 parent bc43d6f commit 0086efa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/debugprint/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ local debugprint_addline = function(opts)
-- 'default' indent for languages like Python, where the NeoVim or Treesitter
-- indenter doesn't know how to indent them.
local current_line = vim.api.nvim_get_current_line()
local leading_space = current_line:match('(%s+)') or ''
local leading_space = current_line:match('^(%s+)') or ''

if opts.above then
line_to_insert_linenr = current_line_nr - 1
Expand Down

0 comments on commit 0086efa

Please sign in to comment.