[rkward/frameworks] rkward: Do not _force_ R highlighting in 'Open Script File'. It might be R markdown, among others.

Thomas Friedrichsmeier null at kde.org
Sun Mar 25 11:46:49 UTC 2018

Git commit df37bb45f82991cdc911b4ed2afbe2166a690662 by Thomas Friedrichsmeier.
Committed on 25/03/2018 at 11:46.
Pushed by tfry into branch 'frameworks'.

Do not _force_ R highlighting in 'Open Script File'. It might be R markdown, among others.

M  +1    -1    rkward/rkward.cpp
M  +1    -1    rkward/windows/rkworkplace.h


diff --git a/rkward/rkward.cpp b/rkward/rkward.cpp
index 41a29ff3..12a78932 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) {
-	RKWorkplace::mainWorkplace ()->openScriptEditor (url, encoding);
+	RKWorkplace::mainWorkplace ()->openScriptEditor (url, encoding, RKSettingsModuleCommandEditor::matchesScriptFileFilter (url.fileName()));
 void RKWardMainWindow::slotOpenCommandEditor () {
diff --git a/rkward/windows/rkworkplace.h b/rkward/windows/rkworkplace.h
index 73a7e4e5..6f7be732 100644
--- a/rkward/windows/rkworkplace.h
+++ b/rkward/windows/rkworkplace.h
@@ -102,7 +102,7 @@ public:
 /** Opens a new script editor
 @param url URL to load. Default option is to open an empty document
 @param encoding encoding to use. If QString (), the default encoding is used.
- at param use_r_highlighting Set R highlighting mode (vs. no highlighting)? Default is yes
+ at param use_r_highlighting Force R highlighting mode? Default is no
 @param read_only Open the document read only? Default is false, i.e. Read-write
 @param force_caption Usually the caption is determined from the url of the file. If you specify a non-empty string here, that is used instead.
 @returns false if a local url could not be opened, true for all remote urls, and on success */

More information about the rkward-tracker mailing list