mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	fix(treesitter): correct condition in __has_ancestor
				
					
				
			This commit is contained in:
		 Amaan Qureshi
					Amaan Qureshi
				
			
				
					committed by
					
						 Lewis Russell
						Lewis Russell
					
				
			
			
				
	
			
			
			 Lewis Russell
						Lewis Russell
					
				
			
						parent
						
							a9e725b26e
						
					
				
				
					commit
					7a20f93a92
				
			| @@ -1151,7 +1151,7 @@ static int __has_ancestor(lua_State *L) | ||||
|   int const pred_len = (int)lua_objlen(L, 2); | ||||
|  | ||||
|   TSNode node = ts_tree_root_node(descendant.tree); | ||||
|   while (node.id != descendant.id) { | ||||
|   while (node.id != descendant.id && !ts_node_is_null(node)) { | ||||
|     char const *node_type = ts_node_type(node); | ||||
|     size_t node_type_len = strlen(node_type); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user