### Godot version

4.0 stable

### System information

Manjaro Linux, kernel 6.1.1-1-MANJARO, AMD Ryzen 5 3600, AMD RX 580

### Issue description

The `wrap_mode` property of the `TextEdit` node doesn't seem to really do anything. Setting it to `LINE_WRAPPING_BOUNDARY` simply means that there won't be an horizontal scrollbar if the text overshoots the boundary, instead of actually forcing the text to the next line so that it stays visible.

### Steps to reproduce

Create a TextEdit node and set its `wrap_mode` property to `LINE_WRAPPING_BOUNDARY`

### Minimal reproduction project

[WrapBugDemo.zip](https://github.com/godotengine/godot/files/10875969/WrapBugDemo.zip)

return selecting_mode;
}
void TextEdit::select_all() {
	if (!selecting_enabled) {
		return;
	}
	if (text.size() == 1 && text[0].length() == 0) {
		return;
	}
	remove_secondary_carets();
	select(0, 0, text.size() - 1, text[text.size() - 1].length());
	set_selection_mode(SelectionMode::SELECTION_MODE_SHIFT, 0, 0);
	carets.write[0].selection.shiftclick_left = true;
	set_caret_line(get_selection_to_line(), false);
	set_caret_column(get_selection_to_column(), false);
	queue_redraw();
}
void TextEdit::select_word_under_caret(int p_caret) {
	ERR_FAIL_COND(p_caret > carets.size());
	if (!selecting_enabled) {
		return;
	}
	if (text.size() == 1 && text[0].length() == 0) {
		return;
	}
	for (int c = 0; c < carets.size(); c++) {
		if (p_caret != -1 && p_caret != c) {