diff --git a/lua/ide/buffers/diffbuffer.lua b/lua/ide/buffers/diffbuffer.lua index a600430..57492c9 100644 --- a/lua/ide/buffers/diffbuffer.lua +++ b/lua/ide/buffers/diffbuffer.lua @@ -41,10 +41,12 @@ DiffBuffer.new = function(path_a, path_b) -- if no wins, create one if #wins == 0 then + local cur_win = vim.api.nvim_get_current_win() vim.cmd("vsplit") -- may inherit the SB win highlight, reset it. vim.api.nvim_win_set_option(cur_win, 'winhighlight', 'Normal:Normal') else + table.sort(wins) vim.api.nvim_set_current_win(wins[1]) end diff --git a/lua/ide/components/explorer/component.lua b/lua/ide/components/explorer/component.lua index 24b60bf..56f5d10 100644 --- a/lua/ide/components/explorer/component.lua +++ b/lua/ide/components/explorer/component.lua @@ -568,7 +568,7 @@ ExplorerComponent.new = function(name, config) return false end - local current = vim.fn.fnamemodify(root.path, ":.") + local current = vim.fn.fnamemodify(root.path, ":.") .. '/' if vim.fn.strpart(dest, 0, #current) == current then if not self.tree.root.expanded then