File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ M.execute = function(args)
91
91
local current_position = state .current_position or default_position
92
92
local position_changed = false
93
93
if args .position then
94
- state .position = args .position
94
+ state .current_position = args .position
95
95
position_changed = args .position ~= current_position
96
96
end
97
97
Original file line number Diff line number Diff line change 348
348
M .position = {
349
349
save = function (state )
350
350
if state .tree and M .window_exists (state ) then
351
- local node = state .tree : get_node ( )
352
- if node then
353
- state .position .node_id = node : get_id ( )
351
+ local success , node = pcall ( state .tree . get_node , state . tree )
352
+ if success and node then
353
+ _ , state .position .node_id = pcall ( node . get_id , node )
354
354
end
355
355
end
356
356
-- Only need to restore the cursor state once per save, comes
You can’t perform that action at this time.
0 commit comments