### Godot version

4.0.2

### System information

Windows 11

### Issue description

Double clicking on `$MyNode` in the script editor will select the whole name including the "$".

But double clicking on `%MyNode` (unique name) will select the name but will not include the "%".

Dragging a node from the scene tree into the script editor brings up the property/method hint list, even though a "." has not been typed. Pressing enter appends "new()" even though this makes no sense as there is no period so it is just appending it directly to the node name: `$MyNodenew()`


### Steps to reproduce

Type `%MyNode` in a script and double click on it.

Type `@onready var x =` in a script, drag a node from the scene tree, then press enter.


### Minimal reproduction project

N/A
}
		set_caret_column(initial_cursor_column - removed_characters, false, c);
	}
	end_complex_operation();
	queue_redraw();
}
void CodeEdit::convert_indent(int p_from_line, int p_to_line) {
	if (!is_editable()) {
		return;
	}
	
	p_from_line = (p_from_line < 0) ? 0 : p_from_line;
	p_to_line = (p_to_line < 0) ? get_line_count() - 1 : p_to_line;
	ERR_FAIL_COND(p_from_line >= get_line_count());
	ERR_FAIL_COND(p_to_line >= get_line_count());
	ERR_FAIL_COND(p_to_line < p_from_line);
	
	Vector<int> caret_columns;
	Vector<Pair<int, int>> from_selections;
	Vector<Pair<int, int>> to_selections;
	caret_columns.resize(get_caret_count());
	from_selections.resize(get_caret_count());
	to_selections.resize(get_caret_count());
	for (int c = 0; c < get_caret_count(); c++) {
		caret_columns.write[c] = get_caret_column(c);
		
		if (!has_selection(c)) {
			from_selections.write[c].first = -1;
			continue;
		}