1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

fix lines ending in comments causing auto indent

This commit is contained in:
Nathan Franke
2022-04-25 14:56:47 -05:00
parent cbdc33bcf7
commit 925e54ad65
2 changed files with 34 additions and 1 deletions

View File

@@ -994,7 +994,8 @@ void CodeEdit::_new_line(bool p_split_current_line, bool p_above) {
}
/* Make sure this is the last char, trailing whitespace or comments are okay. */
if (should_indent && (!is_whitespace(c) && is_in_comment(cl, cc) == -1)) {
/* Increment column for comments because the delimiter (#) should be ignored. */
if (should_indent && (!is_whitespace(c) && is_in_comment(cl, line_col + 1) == -1)) {
should_indent = false;
}
}