We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8140135 commit 72da6e0Copy full SHA for 72da6e0
lua/neorg/modules/core/text-objects/module.lua
@@ -113,7 +113,11 @@ module.public = {
113
get_element_from_cursor = function(node_pattern)
114
local node_at_cursor = vim.treesitter.get_node()
115
116
- if not node_at_cursor or not node_at_cursor:parent():type():match(node_pattern) then
+ if
117
+ not node_at_cursor
118
+ or not node_at_cursor:parent()
119
+ or not node_at_cursor:parent():type():match(node_pattern)
120
+ then
121
log.trace(string.format("Could not find element of pattern '%s' under the cursor", node_pattern))
122
return
123
end
0 commit comments