Skip to content

Commit 1044eba

Browse files
committed
doc: update event subscription example
1 parent 3845039 commit 1044eba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/nvim-tree-lua.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1426,9 +1426,10 @@ Handlers are registered by calling the `events.subscribe` function available in
14261426
For example, registering a handler for when a node is renamed is done like this:
14271427
>
14281428
local api = require('nvim-tree.api')
1429+
local Event = api.events.Event
14291430
14301431
api.events.subscribe(Event.NodeRenamed, function(data)
1431-
print("Node renamed from " .. data.old_name .. " to " .. data.new_name)
1432+
print("Node renamed from " .. data.old_name .. " to " .. data.new_name)
14321433
end)
14331434
<
14341435

0 commit comments

Comments
 (0)