You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Fix for Issue #1484: Don't strip whitespace on line comment
This commit is contained in:
@@ -920,7 +920,7 @@ void ScriptEditor::_menu_option(int p_option) {
|
|||||||
String line_text = tx->get_line(i);
|
String line_text = tx->get_line(i);
|
||||||
|
|
||||||
if (line_text.begins_with("#"))
|
if (line_text.begins_with("#"))
|
||||||
line_text = line_text.strip_edges().substr(1, line_text.length());
|
line_text = line_text.substr(1, line_text.length());
|
||||||
else
|
else
|
||||||
line_text = "#" + line_text;
|
line_text = "#" + line_text;
|
||||||
tx->set_line(i, line_text);
|
tx->set_line(i, line_text);
|
||||||
@@ -932,7 +932,7 @@ void ScriptEditor::_menu_option(int p_option) {
|
|||||||
String line_text = tx->get_line(begin);
|
String line_text = tx->get_line(begin);
|
||||||
|
|
||||||
if (line_text.begins_with("#"))
|
if (line_text.begins_with("#"))
|
||||||
line_text = line_text.strip_edges().substr(1, line_text.length());
|
line_text = line_text.substr(1, line_text.length());
|
||||||
else
|
else
|
||||||
line_text = "#" + line_text;
|
line_text = "#" + line_text;
|
||||||
tx->set_line(begin, line_text);
|
tx->set_line(begin, line_text);
|
||||||
|
|||||||
Reference in New Issue
Block a user