### Godot version

v4.0.2.stable.official [7a0977ce2]

### System information

Windows 10, not platform specific

### Issue description

Methods `get_character_line` and `get_character_paragraph` return wrong indices for characters that are first in the respective line/paragraph. See the attached screenshot.

![image](https://user-images.githubusercontent.com/892180/236546781-692603be-eb09-419e-822e-d4152a66d9b6.png)


### Steps to reproduce

Run attached project.

The script goes through all characters in `RichTextLabel` and prints the respective character, line index, and paragraph index. None of them should be -1 since we are iterating through valid indices.

### Minimal reproduction project

[RichTextLabel.zip](https://github.com/godotengine/godot/files/11409399/RichTextLabel.zip)

menu = memnew(PopupMenu);
	add_child(menu, false, INTERNAL_MODE_FRONT);
	menu->connect("id_pressed", callable_mp(this, &RichTextLabel::menu_option));
	menu->add_item(RTR("Copy"), MENU_COPY);
	menu->add_item(RTR("Select All"), MENU_SELECT_ALL);
}
void RichTextLabel::_update_context_menu() {
	if (!menu) {
		_generate_context_menu();
	}
	int idx = -1;
#define MENU_ITEM_ACTION_DISABLED(m_menu, m_id, m_action, m_disabled)                                                  \
	idx = m_menu->get_item_index(m_id);                                                                                \
	if (idx >= 0) {                                                                                                    \
		m_menu->set_item_accelerator(idx, shortcut_keys_enabled ? _get_menu_action_accelerator(m_action) : Key::NONE); \
		m_menu->set_item_disabled(idx, m_disabled);                                                                    \
	}
	MENU_ITEM_ACTION_DISABLED(menu, MENU_COPY, "ui_copy", !selection.enabled)
	MENU_ITEM_ACTION_DISABLED(menu, MENU_SELECT_ALL, "ui_text_select_all", !selection.enabled)
#undef MENU_ITEM_ACTION_DISABLED
}
Key RichTextLabel::_get_menu_action_accelerator(const String &p_action) {