fix(dir): select origin on parent navigation #40658

This commit is contained in:
Barrett Ruth
2026-07-09 16:47:56 -05:00
committed by GitHub
parent de141b4679
commit 7dccbfed10
2 changed files with 8 additions and 1 deletions

View File

@@ -155,6 +155,9 @@ describe('nvim.dir', function()
assert_directory(root)
line_of('alpha.txt')
-- Ensure the cursor stays on the entry we navigated up from.
eq('alpha.txt', api.nvim_get_current_line())
n.clear({ args_rm = { '--cmd' }, args = { '--noplugin' } })
api.nvim_buf_set_lines(0, 0, -1, false, { ' alpha', ' beta' })
api.nvim_win_set_cursor(0, { 2, 7 })