You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Fix script editor not clonning down last line
This commit is contained in:
@@ -1138,8 +1138,8 @@ void ScriptEditor::_menu_option(int p_option) {
|
|||||||
int line = tx->cursor_get_line();
|
int line = tx->cursor_get_line();
|
||||||
int next_line = line + 1;
|
int next_line = line + 1;
|
||||||
|
|
||||||
if (line == tx->get_line_count() || next_line > tx->get_line_count())
|
if (line == tx->get_line_count() - 1 || next_line >= tx->get_line_count())
|
||||||
return;
|
tx->set_line(line, tx->get_line(line) + "\n");
|
||||||
|
|
||||||
String line_clone = tx->get_line(line);
|
String line_clone = tx->get_line(line);
|
||||||
tx->insert_at(line_clone, next_line);
|
tx->insert_at(line_clone, next_line);
|
||||||
|
|||||||
Reference in New Issue
Block a user