Skip to content

Conversation

alex-courtis
Copy link
Member

@alex-courtis alex-courtis commented Aug 18, 2024

fixes #2830

  • Bulk operations moved to Marks
  • Navigation moved to Marks, 2 bugs fixed:
    • Files would sometimes be opened on navigation
    • Select list unpredictably sorted
  • Simplify greatly
  • Remove unnecessary wrap_explorer

Api.marks.get = wrap_node(wrap_explorer_member("marks", "get_mark"))
Api.marks.list = wrap_explorer_member("marks", "get_marks")
Api.marks.toggle = wrap_node(wrap_explorer_member("marks", "toggle_mark"))
Api.marks.clear = wrap_explorer_member("marks", "clear_marks")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above method names match API

@alex-courtis alex-courtis requested a review from raaymax August 18, 2024 03:41
local explorer_node = require "nvim-tree.explorer.node"
local Filters = require "nvim-tree.explorer.filters"
local Marks = require "nvim-tree.marks"
local Marks = {} -- circular dependencies
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should boil away as core is removed.

return n.absolute_path
end, self:list())

table.sort(list)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

if up then
utils.focus_node_or_parent(prev or last)
else
utils.focus_node_or_parent(next or first)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always focus node directly.

@alex-courtis alex-courtis merged commit e962e97 into master Aug 25, 2024
@alex-courtis alex-courtis deleted the marks-multiinstance-collapse branch August 25, 2024 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi Instance: Refactor: nvim-tree.marks

1 participant