From 2cd007fa4a75bd8a8d09620bf5bc4e4cc353447d Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 22 Oct 2024 16:47:22 +0200 Subject: Clarify `TextEdit.is_caret_visible()` behavior in the class reference --- doc/classes/TextEdit.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc/classes') diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 42558bf992..5bf8dc041d 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -764,7 +764,8 @@ - Returns [code]true[/code] if the caret is visible on the screen. + Returns [code]true[/code] if the caret is visible, [code]false[/code] otherwise. A caret will be considered hidden if it is outside the scrollable area when scrolling is enabled. + [b]Note:[/b] [method is_caret_visible] does not account for a caret being off-screen if it is still within the scrollable area. It will return [code]true[/code] even if the caret is off-screen as long as it meets [TextEdit]'s own conditions for being visible. This includes uses of [member scroll_fit_content_width] and [member scroll_fit_content_height] that cause the [TextEdit] to expand beyond the viewport's bounds. -- cgit v1.2.3