Skip to content

Commit

Permalink
monkey-patch: temporary disable when have modeline
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed May 31, 2024
1 parent d78187f commit e8dbc1f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/indentmini/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ local function on_win(_, winid, bufnr, toprow, botrow)
api.nvim_win_set_hl_ns(winid, ns)
cache.leftcol = vim.fn.winsaveview().leftcol
cache.shiftwidth = get_shiftw_value(bufnr)
--TODO(glepnir): find a way to handle correct with modeline..
if cache.shiftwidth ~= vim.bo[bufnr].tabstop then
return false
end
cache.count = api.nvim_buf_line_count(bufnr)
cache.reg_srow, cache.reg_erow, cache.cur_inlevel = current_line_range(winid, cache.shiftwidth)
for i = toprow, botrow do
Expand Down

0 comments on commit e8dbc1f

Please sign in to comment.