Skip to content

Commit

Permalink
fix: cursor sometimes does not hover previous file
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Nov 15, 2024
1 parent 651299a commit 8ea40b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/oil/view.lua
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,6 @@ local function render_buffer(bufnr, opts)
if seek_after_render == name then
seek_after_render_found = true
jump_idx = #line_table
M.set_last_cursor(bufname, nil)
end
end
end
Expand Down Expand Up @@ -825,6 +824,7 @@ M.render_buffer_async = function(bufnr, opts, callback)
vim.b[bufnr].oil_rendering = false
loading.set_loading(bufnr, false)
render_buffer(bufnr, { jump = true })
M.set_last_cursor(bufname, nil)
vim.bo[bufnr].undolevels = vim.api.nvim_get_option_value("undolevels", { scope = "global" })
vim.bo[bufnr].modifiable = not buffers_locked and adapter.is_modifiable(bufnr)
if callback then
Expand Down

0 comments on commit 8ea40b5

Please sign in to comment.