mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-30 21:21:10 +00:00 
			
		
		
		
	Fixed freeze on search_prev (missing condition for searching from a previous result, now the same as search_next)
Fixes #31328
This commit is contained in:
		
							parent
							
								
									839cc98cb9
								
							
						
					
					
						commit
						6a842fbb6d
					
				
					 1 changed files with 8 additions and 6 deletions
				
			
		|  | @ -362,12 +362,14 @@ bool FindReplaceBar::search_prev() { | |||
| 	int line, col; | ||||
| 	_get_search_from(line, col); | ||||
| 
 | ||||
| 	col -= text.length(); | ||||
| 	if (col < 0) { | ||||
| 		line -= 1; | ||||
| 		if (line < 0) | ||||
| 			line = text_edit->get_line_count() - 1; | ||||
| 		col = text_edit->get_line(line).length(); | ||||
| 	if (line == result_line && col == result_col) { | ||||
| 		col -= text.length(); | ||||
| 		if (col < 0) { | ||||
| 			line -= 1; | ||||
| 			if (line < 0) | ||||
| 				line = text_edit->get_line_count() - 1; | ||||
| 			col = text_edit->get_line(line).length(); | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	return _search(flags, line, col); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue