#331 settings menu option title fix oops
This commit is contained in:
parent
a93ad6e321
commit
2c683b0f99
2 changed files with 7 additions and 7 deletions
|
@ -839,8 +839,8 @@ void TextEdit::backspace_at_cursor() {
|
||||||
|
|
||||||
int prev_line = cursor.column?cursor.line:cursor.line-1;
|
int prev_line = cursor.column?cursor.line:cursor.line-1;
|
||||||
int prev_column = cursor.column?(cursor.column-1):(text[cursor.line-1].length());
|
int prev_column = cursor.column?(cursor.column-1):(text[cursor.line-1].length());
|
||||||
bool auto_brace_tool = EDITOR_DEF("text_editor/auto_brace_tool", false);
|
bool auto_brace_complete = EDITOR_DEF("text_editor/auto_brace_complete", false);
|
||||||
if(auto_brace_tool &&
|
if(auto_brace_complete &&
|
||||||
cursor.column > 0 &&
|
cursor.column > 0 &&
|
||||||
_is_pair_left_symbol(text[cursor.line][cursor.column - 1])) {
|
_is_pair_left_symbol(text[cursor.line][cursor.column - 1])) {
|
||||||
_consume_backspace_for_pair_symbol(prev_line, prev_column);
|
_consume_backspace_for_pair_symbol(prev_line, prev_column);
|
||||||
|
@ -1246,8 +1246,8 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
|
||||||
default:
|
default:
|
||||||
if (k.unicode>=32 && !k.mod.command && !k.mod.alt && !k.mod.meta)
|
if (k.unicode>=32 && !k.mod.command && !k.mod.alt && !k.mod.meta)
|
||||||
clear=true;
|
clear=true;
|
||||||
bool auto_brace_tool=EDITOR_DEF("text_editor/auto_brace_tool", false);
|
bool auto_brace_complete=EDITOR_DEF("text_editor/auto_brace_complete", false);
|
||||||
if (auto_brace_tool && _is_pair_left_symbol(k.unicode))
|
if (auto_brace_complete && _is_pair_left_symbol(k.unicode))
|
||||||
clear=false;
|
clear=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1674,9 +1674,9 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
|
||||||
|
|
||||||
|
|
||||||
const CharType chr[2] = {k.unicode, 0};
|
const CharType chr[2] = {k.unicode, 0};
|
||||||
bool auto_brace_tool = EDITOR_DEF("text_editor/auto_brace_tool", false);
|
bool auto_brace_complete = EDITOR_DEF("text_editor/auto_brace_complete", false);
|
||||||
|
|
||||||
if(auto_brace_tool && _is_pair_symbol(chr[0])) {
|
if(auto_brace_complete && _is_pair_symbol(chr[0])) {
|
||||||
_consume_pair_symbol(chr[0]);
|
_consume_pair_symbol(chr[0]);
|
||||||
} else {
|
} else {
|
||||||
_insert_text_at_cursor(chr);
|
_insert_text_at_cursor(chr);
|
||||||
|
|
|
@ -402,7 +402,7 @@ void EditorSettings::_load_defaults() {
|
||||||
set("text_editor/create_signal_callbacks",true);
|
set("text_editor/create_signal_callbacks",true);
|
||||||
set("text_editor/autosave_interval_seconds",60);
|
set("text_editor/autosave_interval_seconds",60);
|
||||||
set("text_editor/font","");
|
set("text_editor/font","");
|
||||||
set("text_editor/auto_brace_tool", false);
|
set("text_editor/auto_brace_complete", false);
|
||||||
hints["text_editor/font"]=PropertyInfo(Variant::STRING,"text_editor/font",PROPERTY_HINT_GLOBAL_FILE,"*.fnt");
|
hints["text_editor/font"]=PropertyInfo(Variant::STRING,"text_editor/font",PROPERTY_HINT_GLOBAL_FILE,"*.fnt");
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue