-fix readonly issues (#1018)
This commit is contained in:
parent
e0bcec4fb8
commit
d88e192ae4
1 changed files with 11 additions and 1 deletions
|
@ -829,7 +829,7 @@ void TextEdit::_notification(int p_what) {
|
||||||
completion_rect.pos.x=cursor_pos.x-nofs;
|
completion_rect.pos.x=cursor_pos.x-nofs;
|
||||||
}
|
}
|
||||||
|
|
||||||
completion_rect.size.width=w;
|
completion_rect.size.width=w+2;
|
||||||
completion_rect.size.height=h;
|
completion_rect.size.height=h;
|
||||||
if (completion_options.size()<=maxlines)
|
if (completion_options.size()<=maxlines)
|
||||||
scrollw=0;
|
scrollw=0;
|
||||||
|
@ -1034,6 +1034,8 @@ void TextEdit::_consume_backspace_for_pair_symbol(int prev_line, int prev_column
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEdit::backspace_at_cursor() {
|
void TextEdit::backspace_at_cursor() {
|
||||||
|
if (readonly)
|
||||||
|
return;
|
||||||
|
|
||||||
if (cursor.column==0 && cursor.line==0)
|
if (cursor.column==0 && cursor.line==0)
|
||||||
return;
|
return;
|
||||||
|
@ -1251,6 +1253,8 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (completion_active) {
|
if (completion_active) {
|
||||||
|
if (readonly)
|
||||||
|
break;
|
||||||
|
|
||||||
bool valid=true;
|
bool valid=true;
|
||||||
if (k.mod.command || k.mod.alt || k.mod.meta)
|
if (k.mod.command || k.mod.alt || k.mod.meta)
|
||||||
|
@ -1400,6 +1404,9 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
|
||||||
|
|
||||||
if (selection.active) {
|
if (selection.active) {
|
||||||
|
|
||||||
|
if (readonly)
|
||||||
|
break;
|
||||||
|
|
||||||
bool clear=false;
|
bool clear=false;
|
||||||
bool unselect=false;
|
bool unselect=false;
|
||||||
bool dobreak=false;
|
bool dobreak=false;
|
||||||
|
@ -1513,6 +1520,9 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
|
||||||
case KEY_ENTER:
|
case KEY_ENTER:
|
||||||
case KEY_RETURN: {
|
case KEY_RETURN: {
|
||||||
|
|
||||||
|
if (readonly)
|
||||||
|
break;
|
||||||
|
|
||||||
String ins="\n";
|
String ins="\n";
|
||||||
|
|
||||||
//keep indentation
|
//keep indentation
|
||||||
|
|
Loading…
Reference in a new issue