[education/rkward] /: Workaround for invalid EDITOR variable set by Kate Terminal plugin (also fixed in recent kate)

Thomas Friedrichsmeier null at kde.org
Wed Nov 25 15:06:19 GMT 2020


Git commit a47035a537a6df65379af7de6e96dd20bc6293a4 by Thomas Friedrichsmeier.
Committed on 25/11/2020 at 15:06.
Pushed by tfry into branch 'master'.

Workaround for invalid EDITOR variable set by Kate Terminal plugin (also fixed in recent kate)

M  +1    -0    ChangeLog
M  +5    -0    rkward/windows/katepluginintegration.cpp

https://invent.kde.org/education/rkward/commit/a47035a537a6df65379af7de6e96dd20bc6293a4

diff --git a/ChangeLog b/ChangeLog
index 542ccc4e..4a62d7d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+- Workaround for invalid EDITOR variable set by Kate Terminal plugin (also fixed in recent kate)
 - kate plugin related actions are now active whenever a script window is active (not only the corresponding tool window)
   - TODO: support kate plugins in detached windows
 
diff --git a/rkward/windows/katepluginintegration.cpp b/rkward/windows/katepluginintegration.cpp
index c49d6a30..69105249 100644
--- a/rkward/windows/katepluginintegration.cpp
+++ b/rkward/windows/katepluginintegration.cpp
@@ -105,6 +105,11 @@ QObject* KatePluginIntegrationApp::loadPlugin (const QString& identifier) {
 
 	KPluginFactory *factory = KPluginLoader(known_plugins[identifier].data.fileName ()).factory ();
 	if (factory) {
+		if (identifier == "katekonsoleplugin") {
+			// Workaround until https://invent.kde.org/utilities/kate/-/commit/cf11bcbf1f36e2a82b1a1b14090a3f0a2b09ecf4 can be assumed to be present (should be removed in KF6)
+			if (qgetenv("EDITOR").isNull()) qputenv("EDITOR", "vi");
+		}
+
 		KTextEditor::Plugin *plugin = factory->create<KTextEditor::Plugin>(this, QVariantList () << identifier);
 		if (plugin) {
 			known_plugins[identifier].plugin = plugin;




More information about the rkward-tracker mailing list