1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

Style: clang-format: Disable AllowShortIfStatementsOnASingleLine

This commit is contained in:
Rémi Verschelde
2021-05-04 14:28:27 +02:00
parent 6e600cb3f0
commit 3d15f04668
128 changed files with 872 additions and 455 deletions

View File

@@ -478,14 +478,16 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
case KEY_UP: {
shift_selection_check_pre(k->get_shift());
if (get_cursor_position() == 0) handled = false;
if (get_cursor_position() == 0)
handled = false;
set_cursor_position(0);
shift_selection_check_post(k->get_shift());
} break;
case KEY_DOWN: {
shift_selection_check_pre(k->get_shift());
if (get_cursor_position() == text.length()) handled = false;
if (get_cursor_position() == text.length())
handled = false;
set_cursor_position(text.length());
shift_selection_check_post(k->get_shift());
} break;
@@ -1004,7 +1006,8 @@ void LineEdit::paste_text() {
if (paste_buffer != "") {
int prev_len = text.length();
if (selection.enabled) selection_delete();
if (selection.enabled)
selection_delete();
append_at_cursor(paste_buffer);
if (!text_changed_dirty) {
@@ -1220,7 +1223,8 @@ void LineEdit::_toggle_draw_caret() {
void LineEdit::delete_char() {
if ((text.length() <= 0) || (cursor_pos == 0)) return;
if ((text.length() <= 0) || (cursor_pos == 0))
return;
Ref<Font> font = get_font("font");
if (font != NULL) {