[rkward] rkward: Make sure, newly create scripts get R highlighting, again.
Thomas Friedrichsmeier
null at kde.org
Sun Apr 8 18:27:16 UTC 2018
Git commit acc10a35aedbec36f131ea503e74b06e3e86c47d by Thomas Friedrichsmeier.
Committed on 08/04/2018 at 18:26.
Pushed by tfry into branch 'master'.
Make sure, newly create scripts get R highlighting, again.
M +1 -1 rkward/rkward.cpp
M +1 -1 rkward/windows/rkworkplace.cpp
https://commits.kde.org/rkward/acc10a35aedbec36f131ea503e74b06e3e86c47d
diff --git a/rkward/rkward.cpp b/rkward/rkward.cpp
index 12a78932..3fe00a3d 100644
--- a/rkward/rkward.cpp
+++ b/rkward/rkward.cpp
@@ -918,7 +918,7 @@ void RKWardMainWindow::addScriptUrl (const QUrl &url) {
void RKWardMainWindow::slotOpenCommandEditor (const QUrl &url, const QString &encoding) {
RK_TRACE (APP);
- RKWorkplace::mainWorkplace ()->openScriptEditor (url, encoding, RKSettingsModuleCommandEditor::matchesScriptFileFilter (url.fileName()));
+ RKWorkplace::mainWorkplace ()->openScriptEditor (url, encoding, url.isEmpty() || RKSettingsModuleCommandEditor::matchesScriptFileFilter (url.fileName()));
}
void RKWardMainWindow::slotOpenCommandEditor () {
diff --git a/rkward/windows/rkworkplace.cpp b/rkward/windows/rkworkplace.cpp
index e38256c4..9cac2794 100644
--- a/rkward/windows/rkworkplace.cpp
+++ b/rkward/windows/rkworkplace.cpp
@@ -944,7 +944,7 @@ void RKWorkplace::splitAndAttachWindow (RKMDIWindow* source) {
if (source->isType (RKMDIWindow::CommandEditorWindow)) {
QUrl url = static_cast<RKCommandEditorWindow*> (source)->url ();
- openScriptEditor (url, QString (), RKSettingsModuleCommandEditor::matchesScriptFileFilter (url.fileName()));
+ openScriptEditor (url, QString (), url.isEmpty () || RKSettingsModuleCommandEditor::matchesScriptFileFilter (url.fileName()));
} else if (source->isType (RKMDIWindow::HelpWindow)) {
openHelpWindow (static_cast<RKHTMLWindow*> (source)->url ());
} else if (source->isType (RKMDIWindow::OutputWindow)) {
More information about the rkward-tracker
mailing list