nano: Add File Manager option to edit selected file
Change-Id: Ie7d940545569e6de976d2a51666b692f3fc23798
diff --git a/gui/action.cpp b/gui/action.cpp
index 1ab4ee4..ecb035e 100755
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -237,6 +237,9 @@
ADD_ACTION(uninstalltwrpsystemapp);
ADD_ACTION(repackimage);
ADD_ACTION(fixabrecoverybootloop);
+#ifndef TW_EXCLUDE_NANO
+ ADD_ACTION(editfile);
+#endif
}
// First, get the action
@@ -2253,3 +2256,15 @@
gui_changePage("terminalcommand");
return 0;
}
+#ifndef TW_EXCLUDE_NANO
+int GUIAction::editfile(std::string arg) {
+ if (term != NULL) {
+ for (uint8_t iter = 0; iter < arg.size(); iter++)
+ term->NotifyCharInput(arg.at(iter));
+ term->NotifyCharInput(13);
+ }
+ else
+ LOGINFO("Unable to switch to Terminal\n");
+ return 0;
+}
+#endif