(cherry picked from commit 9be034a8cd3d2e71f7075a5200245b43e02444b5)
@@ -1184,7 +1184,9 @@ void LineEdit::menu_option(int p_option) {
select_all();
} break;
case MENU_UNDO: {
- undo();
+ if (editable) {
+ undo();
+ }
}