Skip to content

Commit

Permalink
fix: set modifiable true before setting lines in DashboardUpdateFooter (
Browse files Browse the repository at this point in the history
  • Loading branch information
ilan-schemoul authored Apr 4, 2024
1 parent 7c0c09d commit 9aae42c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/dashboard/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,15 @@ function utils.add_update_footer_command(bufnr, footer)
end

local first_line = vim.api.nvim_buf_line_count(bufnr)
vim.bo[bufnr].modifiable = true
vim.api.nvim_buf_set_lines(
bufnr,
first_line - last_footer_size,
-1,
false,
utils.center_align(args.fargs)
)
vim.bo[bufnr].modifiable = false
vim.bo[bufnr].modified = false

last_footer_size = #args.fargs -- For future calculation of size
Expand Down

0 comments on commit 9aae42c

Please sign in to comment.