Merge pull request #89469 from garrettgu10/ggu/multicursor-bugfix
Fix bug related to multicursor and backspacing with brackets
This commit is contained in:
commit
a5a5ce7052
1 changed files with 5 additions and 4 deletions
|
@ -733,14 +733,15 @@ void CodeEdit::_backspace_internal(int p_caret) {
|
||||||
prev_column = cc - auto_brace_completion_pairs[idx].open_key.length();
|
prev_column = cc - auto_brace_completion_pairs[idx].open_key.length();
|
||||||
|
|
||||||
if (_get_auto_brace_pair_close_at_pos(cl, cc) == idx) {
|
if (_get_auto_brace_pair_close_at_pos(cl, cc) == idx) {
|
||||||
remove_text(prev_line, prev_column, cl, cc + auto_brace_completion_pairs[idx].close_key.length());
|
cc += auto_brace_completion_pairs[idx].close_key.length();
|
||||||
} else {
|
|
||||||
remove_text(prev_line, prev_column, cl, cc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
remove_text(prev_line, prev_column, cl, cc);
|
||||||
|
|
||||||
set_caret_line(prev_line, false, true, 0, i);
|
set_caret_line(prev_line, false, true, 0, i);
|
||||||
set_caret_column(prev_column, i == 0, i);
|
set_caret_column(prev_column, i == 0, i);
|
||||||
|
|
||||||
adjust_carets_after_edit(i, prev_line, prev_column, cl, cc + auto_brace_completion_pairs[idx].close_key.length());
|
adjust_carets_after_edit(i, prev_line, prev_column, cl, cc);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue