From 832aac594fc93095a50a4095f65f25c6442c40e2 Mon Sep 17 00:00:00 2001 From: dail8859 Date: Tue, 24 Dec 2019 13:59:48 -0500 Subject: [PATCH 01/17] Rename artifacts with version number --- appveyor.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index e764bc2b8..6d1e3c751 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,9 +24,6 @@ after_build: - cd build_installer - qmake ..\installer\installer.pro - jom - -artifacts: - - path: NotepadNext.zip - name: NotepadNext-v$(appveyor_build_version).zip - - path: build_installer\NotepadNext-v0.1.exe - name: NotepadNext-v$(appveyor_build_version)-setup.exe + - cd %APPVEYOR_BUILD_FOLDER% + - appveyor PushArtifact NotepadNext.zip -FileName NotepadNext-v%APPVEYOR_BUILD_VERSION%.zip + - appveyor PushArtifact build_installer\NotepadNext-v0.1.exe -FileName NotepadNext-v%APPVEYOR_BUILD_VERSION%-setup.exe From a57f745beefcbe4239b4cde6a813cf3c0ca72893 Mon Sep 17 00:00:00 2001 From: dail8859 Date: Sat, 28 Dec 2019 09:44:23 -0500 Subject: [PATCH 02/17] Run uninstaller before installing QTIFW does not support installing over an existing version. See https://stackoverflow.com/a/46614107 --- installer/config/config.xml | 4 +- .../app/data/scripts/auto_uninstall.qs | 23 ++++ installer/packages/app/meta/installscript.qs | 50 ++++++++ installer/packages/app/meta/package.xml | 1 + installer/packages/app/meta/targetwidget.ui | 113 ++++++++++++++++++ 5 files changed, 189 insertions(+), 2 deletions(-) create mode 100644 installer/packages/app/data/scripts/auto_uninstall.qs create mode 100644 installer/packages/app/meta/targetwidget.ui diff --git a/installer/config/config.xml b/installer/config/config.xml index 1b23f5d79..3fa5461fd 100644 --- a/installer/config/config.xml +++ b/installer/config/config.xml @@ -7,8 +7,8 @@ Notepad Next true - true - @ApplicationsDirX64@/Notepad Next + false + @ApplicationsDirX64@\Notepad Next diff --git a/installer/packages/app/data/scripts/auto_uninstall.qs b/installer/packages/app/data/scripts/auto_uninstall.qs new file mode 100644 index 000000000..a2929bffc --- /dev/null +++ b/installer/packages/app/data/scripts/auto_uninstall.qs @@ -0,0 +1,23 @@ +// Controller script to pass to the uninstaller to get it to run automatically. +// It's passed to the maintenance tool during installation if there is already an +// installation present with: /maintenancetool.exe --script=/scripts/auto_uninstall.qs. +// This is required so that the user doesn't have to see/deal with the uninstaller in the middle of +// an installation. + +function Controller() +{ + gui.clickButton(buttons.NextButton); + gui.clickButton(buttons.NextButton); + + installer.uninstallationFinished.connect(this, this.uninstallationFinished); +} + +Controller.prototype.uninstallationFinished = function() +{ + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.FinishedPageCallback = function() +{ + gui.clickButton(buttons.FinishButton); +} \ No newline at end of file diff --git a/installer/packages/app/meta/installscript.qs b/installer/packages/app/meta/installscript.qs index 051172214..320ce410d 100644 --- a/installer/packages/app/meta/installscript.qs +++ b/installer/packages/app/meta/installscript.qs @@ -14,9 +14,12 @@ // You should have received a copy of the GNU General Public License // along with Notepad Next. If not, see . +var targetDirectoryPage = null; function Component() { + component.loaded.connect(this, this.installerLoaded); + component.loaded.connect(this, function() { if (installer.isInstaller()) { if (systemInfo.productType === "windows") { @@ -71,3 +74,50 @@ Component.prototype.createOperations = function() } } } + +Component.prototype.installerLoaded = function() +{ + installer.setDefaultPageVisible(QInstaller.TargetDirectory, false); + installer.addWizardPage(component, "TargetWidget", QInstaller.TargetDirectory); + + targetDirectoryPage = gui.pageWidgetByObjectName("DynamicTargetWidget"); + targetDirectoryPage.windowTitle = "Choose Installation Directory"; + targetDirectoryPage.description.setText("Please select where Notepad Next will be installed:"); + targetDirectoryPage.targetDirectory.textChanged.connect(this, this.targetDirectoryChanged); + targetDirectoryPage.targetDirectory.setText(installer.value("TargetDir")); + targetDirectoryPage.targetChooser.released.connect(this, this.targetChooserClicked); + + gui.pageById(QInstaller.PerformInstallation).entered.connect(this, this.performInstallationPageEntered); +} + +Component.prototype.targetChooserClicked = function() +{ + var dir = QFileDialog.getExistingDirectory("", targetDirectoryPage.targetDirectory.text); + targetDirectoryPage.targetDirectory.setText(dir); +} + +Component.prototype.targetDirectoryChanged = function() +{ + var dir = targetDirectoryPage.targetDirectory.text; + if (installer.fileExists(dir) && installer.fileExists(dir + "/maintenancetool.exe")) { + targetDirectoryPage.warning.setText("

Existing installation will be uninstalled.

"); + } + else if (installer.fileExists(dir)) { + targetDirectoryPage.warning.setText("

Installing in existing directory. Its existing contents will be removed.

"); + } + else { + targetDirectoryPage.warning.setText(""); + } + + installer.setValue("TargetDir", dir); +} + +Component.prototype.performInstallationPageEntered = function() +{ + var dir = installer.value("TargetDir"); + + if (installer.fileExists(dir) && installer.fileExists(dir + "/maintenancetool.exe")) { + console.log("Running uninstaller: " + dir + "/maintenancetool.exe"); + installer.execute(dir + "/maintenancetool.exe", new Array("--script", dir + "/scripts/auto_uninstall.qs")); + } +} diff --git a/installer/packages/app/meta/package.xml b/installer/packages/app/meta/package.xml index 6c850a71f..d3d5d75d8 100644 --- a/installer/packages/app/meta/package.xml +++ b/installer/packages/app/meta/package.xml @@ -9,5 +9,6 @@ installoptions.ui + targetwidget.ui diff --git a/installer/packages/app/meta/targetwidget.ui b/installer/packages/app/meta/targetwidget.ui new file mode 100644 index 000000000..0f08115e0 --- /dev/null +++ b/installer/packages/app/meta/targetwidget.ui @@ -0,0 +1,113 @@ + + + TargetWidget + + + + 0 + 0 + 491 + 190 + + + + + 0 + 0 + + + + + 491 + 190 + + + + Form + + + + + + + + + + + + + + + false + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + ... + + + + + + + + + 0 + + + + + true + + + TextLabel + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 122 + + + + + + + + + From fe490ea263848781633016b639ccf68b9a23a8fa Mon Sep 17 00:00:00 2001 From: dail8859 Date: Mon, 6 Jan 2020 21:35:24 -0500 Subject: [PATCH 03/17] Move options to target directory dialog --- installer/packages/app/meta/installoptions.ui | 55 ------------------- installer/packages/app/meta/installscript.qs | 15 +---- installer/packages/app/meta/targetwidget.ui | 40 +++++++++++++- 3 files changed, 42 insertions(+), 68 deletions(-) delete mode 100644 installer/packages/app/meta/installoptions.ui diff --git a/installer/packages/app/meta/installoptions.ui b/installer/packages/app/meta/installoptions.ui deleted file mode 100644 index 1141ff2d3..000000000 --- a/installer/packages/app/meta/installoptions.ui +++ /dev/null @@ -1,55 +0,0 @@ - - - InstallOptionsForm - - - - 0 - 0 - 400 - 300 - - - - Form - - - - - - Add Context Menu - - - - - - - Add Desktop Shortcut - - - - - - - Add Start Menu Shortcut - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - diff --git a/installer/packages/app/meta/installscript.qs b/installer/packages/app/meta/installscript.qs index 320ce410d..cf5d2a038 100644 --- a/installer/packages/app/meta/installscript.qs +++ b/installer/packages/app/meta/installscript.qs @@ -19,14 +19,6 @@ var targetDirectoryPage = null; function Component() { component.loaded.connect(this, this.installerLoaded); - - component.loaded.connect(this, function() { - if (installer.isInstaller()) { - if (systemInfo.productType === "windows") { - installer.addWizardPageItem(component, "InstallOptionsForm", QInstaller.TargetDirectory); - } - } - }); } Component.prototype.createOperations = function() @@ -34,9 +26,9 @@ Component.prototype.createOperations = function() // call default implementation to actually install the registeredfile component.createOperations(); - var isContextMenuChecked = component.userInterface("InstallOptionsForm").addContextMenu.checked; - var isDesktopShortcutChecked = component.userInterface("InstallOptionsForm").addDesktopShortcut.checked; - var isStartMenuShortcutChecked = component.userInterface("InstallOptionsForm").addStartMenuShortcut.checked; + var isContextMenuChecked = component.userInterface("TargetWidget").addContextMenu.checked; + var isDesktopShortcutChecked = component.userInterface("TargetWidget").addDesktopShortcut.checked; + var isStartMenuShortcutChecked = component.userInterface("TargetWidget").addStartMenuShortcut.checked; if (systemInfo.productType === "windows") { // Right-click context menu if (isContextMenuChecked) { @@ -82,7 +74,6 @@ Component.prototype.installerLoaded = function() targetDirectoryPage = gui.pageWidgetByObjectName("DynamicTargetWidget"); targetDirectoryPage.windowTitle = "Choose Installation Directory"; - targetDirectoryPage.description.setText("Please select where Notepad Next will be installed:"); targetDirectoryPage.targetDirectory.textChanged.connect(this, this.targetDirectoryChanged); targetDirectoryPage.targetDirectory.setText(installer.value("TargetDir")); targetDirectoryPage.targetChooser.released.connect(this, this.targetChooserClicked); diff --git a/installer/packages/app/meta/targetwidget.ui b/installer/packages/app/meta/targetwidget.ui index 0f08115e0..84af1780a 100644 --- a/installer/packages/app/meta/targetwidget.ui +++ b/installer/packages/app/meta/targetwidget.ui @@ -29,7 +29,7 @@ - + Please select where Notepad Next will be installed: @@ -93,6 +93,44 @@ + + + + + + Add Context Menu + + + + + + + Add Desktop Shortcut + + + + + + + Add Start Menu Shortcut + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + From d14772cfd48c3c761e0c5201185c4ff7f0f28587 Mon Sep 17 00:00:00 2001 From: dail8859 Date: Wed, 8 Apr 2020 11:37:27 -0400 Subject: [PATCH 04/17] Add structure to folder hierarchy --- src/NotepadNext/NotepadNext.pro | 80 ++++++++++--------- .../{ => dialogs}/FindReplaceDialog.cpp | 0 .../{ => dialogs}/FindReplaceDialog.h | 0 .../{ => dialogs}/FindReplaceDialog.ui | 0 .../{ => dialogs}/LuaConsoleDock.cpp | 1 - .../{ => dialogs}/LuaConsoleDock.h | 0 .../{ => dialogs}/LuaConsoleDock.ui | 0 .../{ => dialogs}/MacroRunDialog.cpp | 0 .../{ => dialogs}/MacroRunDialog.h | 0 .../{ => dialogs}/MacroRunDialog.ui | 0 .../{ => dialogs}/MacroSaveDialog.cpp | 0 .../{ => dialogs}/MacroSaveDialog.h | 0 .../{ => dialogs}/MacroSaveDialog.ui | 0 src/NotepadNext/{ => dialogs}/MainWindow.cpp | 2 +- src/NotepadNext/{ => dialogs}/MainWindow.h | 0 src/NotepadNext/{ => dialogs}/MainWindow.ui | 0 .../{ => dialogs}/PreferencesDialog.cpp | 0 .../{ => dialogs}/PreferencesDialog.h | 0 .../{ => dialogs}/PreferencesDialog.ui | 0 .../{ => dialogs}/WindowListDialog.cpp | 0 .../{ => dialogs}/WindowListDialog.h | 0 .../{ => dialogs}/WindowListDialog.ui | 0 src/NotepadNext/{ => plugins}/BraceMatch.cpp | 0 src/NotepadNext/{ => plugins}/BraceMatch.h | 0 .../{ => plugins}/HighlightedScrollBar.cpp | 0 .../{ => plugins}/HighlightedScrollBar.h | 0 src/NotepadNext/{ => plugins}/LineNumbers.cpp | 3 +- src/NotepadNext/{ => plugins}/LineNumbers.h | 2 + src/NotepadNext/{ => plugins}/Plugin.cpp | 0 src/NotepadNext/{ => plugins}/Plugin.h | 2 + .../{ => plugins}/SmartHighlighter.cpp | 0 .../{ => plugins}/SmartHighlighter.h | 0 src/NotepadNext/{ => widgets}/NppTabBar.cpp | 0 src/NotepadNext/{ => widgets}/NppTabBar.h | 0 src/NotepadNext/{ => widgets}/StatusLabel.cpp | 0 src/NotepadNext/{ => widgets}/StatusLabel.h | 0 .../{ => widgets}/TabbedEditor.cpp | 0 src/NotepadNext/{ => widgets}/TabbedEditor.h | 0 38 files changed, 48 insertions(+), 42 deletions(-) rename src/NotepadNext/{ => dialogs}/FindReplaceDialog.cpp (100%) rename src/NotepadNext/{ => dialogs}/FindReplaceDialog.h (100%) rename src/NotepadNext/{ => dialogs}/FindReplaceDialog.ui (100%) rename src/NotepadNext/{ => dialogs}/LuaConsoleDock.cpp (99%) rename src/NotepadNext/{ => dialogs}/LuaConsoleDock.h (100%) rename src/NotepadNext/{ => dialogs}/LuaConsoleDock.ui (100%) rename src/NotepadNext/{ => dialogs}/MacroRunDialog.cpp (100%) rename src/NotepadNext/{ => dialogs}/MacroRunDialog.h (100%) rename src/NotepadNext/{ => dialogs}/MacroRunDialog.ui (100%) rename src/NotepadNext/{ => dialogs}/MacroSaveDialog.cpp (100%) rename src/NotepadNext/{ => dialogs}/MacroSaveDialog.h (100%) rename src/NotepadNext/{ => dialogs}/MacroSaveDialog.ui (100%) rename src/NotepadNext/{ => dialogs}/MainWindow.cpp (99%) rename src/NotepadNext/{ => dialogs}/MainWindow.h (100%) rename src/NotepadNext/{ => dialogs}/MainWindow.ui (100%) rename src/NotepadNext/{ => dialogs}/PreferencesDialog.cpp (100%) rename src/NotepadNext/{ => dialogs}/PreferencesDialog.h (100%) rename src/NotepadNext/{ => dialogs}/PreferencesDialog.ui (100%) rename src/NotepadNext/{ => dialogs}/WindowListDialog.cpp (100%) rename src/NotepadNext/{ => dialogs}/WindowListDialog.h (100%) rename src/NotepadNext/{ => dialogs}/WindowListDialog.ui (100%) rename src/NotepadNext/{ => plugins}/BraceMatch.cpp (100%) rename src/NotepadNext/{ => plugins}/BraceMatch.h (100%) rename src/NotepadNext/{ => plugins}/HighlightedScrollBar.cpp (100%) rename src/NotepadNext/{ => plugins}/HighlightedScrollBar.h (100%) rename src/NotepadNext/{ => plugins}/LineNumbers.cpp (98%) rename src/NotepadNext/{ => plugins}/LineNumbers.h (98%) rename src/NotepadNext/{ => plugins}/Plugin.cpp (100%) rename src/NotepadNext/{ => plugins}/Plugin.h (98%) rename src/NotepadNext/{ => plugins}/SmartHighlighter.cpp (100%) rename src/NotepadNext/{ => plugins}/SmartHighlighter.h (100%) rename src/NotepadNext/{ => widgets}/NppTabBar.cpp (100%) rename src/NotepadNext/{ => widgets}/NppTabBar.h (100%) rename src/NotepadNext/{ => widgets}/StatusLabel.cpp (100%) rename src/NotepadNext/{ => widgets}/StatusLabel.h (100%) rename src/NotepadNext/{ => widgets}/TabbedEditor.cpp (100%) rename src/NotepadNext/{ => widgets}/TabbedEditor.h (100%) diff --git a/src/NotepadNext/NotepadNext.pro b/src/NotepadNext/NotepadNext.pro index 8956f431d..c720c59d0 100644 --- a/src/NotepadNext/NotepadNext.pro +++ b/src/NotepadNext/NotepadNext.pro @@ -37,23 +37,17 @@ win32 { SOURCES += \ Finder.cpp \ - LineNumbers.cpp \ main.cpp \ ScintillaBuffer.cpp \ - MainWindow.cpp \ BufferManager.cpp \ - TabbedEditor.cpp \ + widgets/TabbedEditor.cpp \ BufferView.cpp \ - NppTabBar.cpp \ - StatusLabel.cpp \ - HighlightedScrollBar.cpp \ + widgets/NppTabBar.cpp \ + widgets/StatusLabel.cpp \ NppImporter.cpp \ RecentFilesListManager.cpp \ - FindReplaceDialog.cpp \ - SmartHighlighter.cpp \ ScintillaNext.cpp \ QRegexSearch.cpp \ - LuaConsoleDock.cpp \ LuaState.cpp \ IFaceTable.cpp \ LuaExtension.cpp \ @@ -61,32 +55,32 @@ SOURCES += \ IFaceTableMixer.cpp \ NotepadNextApplication.cpp \ MacroRecorder.cpp \ - MacroRunDialog.cpp \ - MacroSaveDialog.cpp \ - WindowListDialog.cpp \ - PreferencesDialog.cpp \ Settings.cpp \ - Plugin.cpp \ - BraceMatch.cpp + dialogs/MacroRunDialog.cpp \ + dialogs/MacroSaveDialog.cpp \ + dialogs/WindowListDialog.cpp \ + dialogs/PreferencesDialog.cpp \ + dialogs/MainWindow.cpp \ + dialogs/FindReplaceDialog.cpp \ + dialogs/LuaConsoleDock.cpp \ + plugins/Plugin.cpp \ + plugins/HighlightedScrollBar.cpp \ + plugins/SmartHighlighter.cpp \ + plugins/BraceMatch.cpp \ + plugins/LineNumbers.cpp HEADERS += \ Finder.h \ - LineNumbers.h \ ScintillaBuffer.h \ - MainWindow.h \ BufferManager.h \ - TabbedEditor.h \ + widgets/TabbedEditor.h \ BufferView.h \ - NppTabBar.h \ - StatusLabel.h \ - HighlightedScrollBar.h \ + widgets/NppTabBar.h \ + widgets/StatusLabel.h \ NppImporter.h \ RecentFilesListManager.h \ - FindReplaceDialog.h \ - SmartHighlighter.h \ ScintillaNext.h \ QRegexSearch.h \ - LuaConsoleDock.h \ LuaState.h \ IFaceTable.h \ LuaExtension.h \ @@ -94,27 +88,37 @@ HEADERS += \ IFaceTableMixer.h \ NotepadNextApplication.h \ MacroRecorder.h \ - MacroRunDialog.h \ - MacroSaveDialog.h \ - WindowListDialog.h \ - PreferencesDialog.h \ Settings.h \ - Plugin.h \ - BraceMatch.h + dialogs/MainWindow.h \ + dialogs/FindReplaceDialog.h \ + dialogs/LuaConsoleDock.h \ + dialogs/MacroRunDialog.h \ + dialogs/MacroSaveDialog.h \ + dialogs/WindowListDialog.h \ + dialogs/PreferencesDialog.h \ + plugins/Plugin.h \ + plugins/HighlightedScrollBar.h \ + plugins/SmartHighlighter.h \ + plugins/BraceMatch.h \ + plugins/LineNumbers.h FORMS += \ - MainWindow.ui \ - FindReplaceDialog.ui \ - LuaConsoleDock.ui \ - MacroRunDialog.ui \ - MacroSaveDialog.ui \ - WindowListDialog.ui \ - PreferencesDialog.ui + dialogs/MainWindow.ui \ + dialogs/FindReplaceDialog.ui \ + dialogs/LuaConsoleDock.ui \ + dialogs/MacroRunDialog.ui \ + dialogs/MacroSaveDialog.ui \ + dialogs/WindowListDialog.ui \ + dialogs/PreferencesDialog.ui RESOURCES += \ resources.qrc \ scripts.qrc +INCLUDEPATH += $$PWD/plugins +INCLUDEPATH += $$PWD/dialogs +INCLUDEPATH += $$PWD/widgets + # Statically link in Scintilla DEFINES += EXPORT_IMPORT_API= SCI_OWNREGEX LIBS += -L$$OUT_PWD/../scintilla/qt/ScintillaEdit/ -lScintillaEdit @@ -146,5 +150,3 @@ DEFINES += LUA_VERSION_NUM=503 win32-g++:LIBS += libUser32 win32-msvc*:LIBS += User32.lib - -DISTFILES += diff --git a/src/NotepadNext/FindReplaceDialog.cpp b/src/NotepadNext/dialogs/FindReplaceDialog.cpp similarity index 100% rename from src/NotepadNext/FindReplaceDialog.cpp rename to src/NotepadNext/dialogs/FindReplaceDialog.cpp diff --git a/src/NotepadNext/FindReplaceDialog.h b/src/NotepadNext/dialogs/FindReplaceDialog.h similarity index 100% rename from src/NotepadNext/FindReplaceDialog.h rename to src/NotepadNext/dialogs/FindReplaceDialog.h diff --git a/src/NotepadNext/FindReplaceDialog.ui b/src/NotepadNext/dialogs/FindReplaceDialog.ui similarity index 100% rename from src/NotepadNext/FindReplaceDialog.ui rename to src/NotepadNext/dialogs/FindReplaceDialog.ui diff --git a/src/NotepadNext/LuaConsoleDock.cpp b/src/NotepadNext/dialogs/LuaConsoleDock.cpp similarity index 99% rename from src/NotepadNext/LuaConsoleDock.cpp rename to src/NotepadNext/dialogs/LuaConsoleDock.cpp index 7c4a4a678..f51f10949 100644 --- a/src/NotepadNext/LuaConsoleDock.cpp +++ b/src/NotepadNext/dialogs/LuaConsoleDock.cpp @@ -30,7 +30,6 @@ #include "LuaExtension.h" #include -#include #include #define INDIC_BRACEHIGHLIGHT INDIC_CONTAINER diff --git a/src/NotepadNext/LuaConsoleDock.h b/src/NotepadNext/dialogs/LuaConsoleDock.h similarity index 100% rename from src/NotepadNext/LuaConsoleDock.h rename to src/NotepadNext/dialogs/LuaConsoleDock.h diff --git a/src/NotepadNext/LuaConsoleDock.ui b/src/NotepadNext/dialogs/LuaConsoleDock.ui similarity index 100% rename from src/NotepadNext/LuaConsoleDock.ui rename to src/NotepadNext/dialogs/LuaConsoleDock.ui diff --git a/src/NotepadNext/MacroRunDialog.cpp b/src/NotepadNext/dialogs/MacroRunDialog.cpp similarity index 100% rename from src/NotepadNext/MacroRunDialog.cpp rename to src/NotepadNext/dialogs/MacroRunDialog.cpp diff --git a/src/NotepadNext/MacroRunDialog.h b/src/NotepadNext/dialogs/MacroRunDialog.h similarity index 100% rename from src/NotepadNext/MacroRunDialog.h rename to src/NotepadNext/dialogs/MacroRunDialog.h diff --git a/src/NotepadNext/MacroRunDialog.ui b/src/NotepadNext/dialogs/MacroRunDialog.ui similarity index 100% rename from src/NotepadNext/MacroRunDialog.ui rename to src/NotepadNext/dialogs/MacroRunDialog.ui diff --git a/src/NotepadNext/MacroSaveDialog.cpp b/src/NotepadNext/dialogs/MacroSaveDialog.cpp similarity index 100% rename from src/NotepadNext/MacroSaveDialog.cpp rename to src/NotepadNext/dialogs/MacroSaveDialog.cpp diff --git a/src/NotepadNext/MacroSaveDialog.h b/src/NotepadNext/dialogs/MacroSaveDialog.h similarity index 100% rename from src/NotepadNext/MacroSaveDialog.h rename to src/NotepadNext/dialogs/MacroSaveDialog.h diff --git a/src/NotepadNext/MacroSaveDialog.ui b/src/NotepadNext/dialogs/MacroSaveDialog.ui similarity index 100% rename from src/NotepadNext/MacroSaveDialog.ui rename to src/NotepadNext/dialogs/MacroSaveDialog.ui diff --git a/src/NotepadNext/MainWindow.cpp b/src/NotepadNext/dialogs/MainWindow.cpp similarity index 99% rename from src/NotepadNext/MainWindow.cpp rename to src/NotepadNext/dialogs/MainWindow.cpp index fd35784a5..7863af279 100644 --- a/src/NotepadNext/MainWindow.cpp +++ b/src/NotepadNext/dialogs/MainWindow.cpp @@ -778,7 +778,7 @@ void MainWindow::setupEditor(ScintillaNext *editor) editor->styleSetFore(STYLE_LINENUMBER, 0x808080); editor->styleSetBack(STYLE_LINENUMBER, 0xE4E4E4); - editor->styleSetBold(STYLE_LINENUMBER, true); + editor->styleSetBold(STYLE_LINENUMBER, false); editor->styleSetFore(STYLE_BRACELIGHT, 0x0000FF); editor->styleSetBack(STYLE_BRACELIGHT, 0xFFFFFF); diff --git a/src/NotepadNext/MainWindow.h b/src/NotepadNext/dialogs/MainWindow.h similarity index 100% rename from src/NotepadNext/MainWindow.h rename to src/NotepadNext/dialogs/MainWindow.h diff --git a/src/NotepadNext/MainWindow.ui b/src/NotepadNext/dialogs/MainWindow.ui similarity index 100% rename from src/NotepadNext/MainWindow.ui rename to src/NotepadNext/dialogs/MainWindow.ui diff --git a/src/NotepadNext/PreferencesDialog.cpp b/src/NotepadNext/dialogs/PreferencesDialog.cpp similarity index 100% rename from src/NotepadNext/PreferencesDialog.cpp rename to src/NotepadNext/dialogs/PreferencesDialog.cpp diff --git a/src/NotepadNext/PreferencesDialog.h b/src/NotepadNext/dialogs/PreferencesDialog.h similarity index 100% rename from src/NotepadNext/PreferencesDialog.h rename to src/NotepadNext/dialogs/PreferencesDialog.h diff --git a/src/NotepadNext/PreferencesDialog.ui b/src/NotepadNext/dialogs/PreferencesDialog.ui similarity index 100% rename from src/NotepadNext/PreferencesDialog.ui rename to src/NotepadNext/dialogs/PreferencesDialog.ui diff --git a/src/NotepadNext/WindowListDialog.cpp b/src/NotepadNext/dialogs/WindowListDialog.cpp similarity index 100% rename from src/NotepadNext/WindowListDialog.cpp rename to src/NotepadNext/dialogs/WindowListDialog.cpp diff --git a/src/NotepadNext/WindowListDialog.h b/src/NotepadNext/dialogs/WindowListDialog.h similarity index 100% rename from src/NotepadNext/WindowListDialog.h rename to src/NotepadNext/dialogs/WindowListDialog.h diff --git a/src/NotepadNext/WindowListDialog.ui b/src/NotepadNext/dialogs/WindowListDialog.ui similarity index 100% rename from src/NotepadNext/WindowListDialog.ui rename to src/NotepadNext/dialogs/WindowListDialog.ui diff --git a/src/NotepadNext/BraceMatch.cpp b/src/NotepadNext/plugins/BraceMatch.cpp similarity index 100% rename from src/NotepadNext/BraceMatch.cpp rename to src/NotepadNext/plugins/BraceMatch.cpp diff --git a/src/NotepadNext/BraceMatch.h b/src/NotepadNext/plugins/BraceMatch.h similarity index 100% rename from src/NotepadNext/BraceMatch.h rename to src/NotepadNext/plugins/BraceMatch.h diff --git a/src/NotepadNext/HighlightedScrollBar.cpp b/src/NotepadNext/plugins/HighlightedScrollBar.cpp similarity index 100% rename from src/NotepadNext/HighlightedScrollBar.cpp rename to src/NotepadNext/plugins/HighlightedScrollBar.cpp diff --git a/src/NotepadNext/HighlightedScrollBar.h b/src/NotepadNext/plugins/HighlightedScrollBar.h similarity index 100% rename from src/NotepadNext/HighlightedScrollBar.h rename to src/NotepadNext/plugins/HighlightedScrollBar.h diff --git a/src/NotepadNext/LineNumbers.cpp b/src/NotepadNext/plugins/LineNumbers.cpp similarity index 98% rename from src/NotepadNext/LineNumbers.cpp rename to src/NotepadNext/plugins/LineNumbers.cpp index 8c471205b..892e511f8 100644 --- a/src/NotepadNext/LineNumbers.cpp +++ b/src/NotepadNext/plugins/LineNumbers.cpp @@ -19,9 +19,10 @@ #include "LineNumbers.h" -// Ugly but efficient + static inline int countDigits(quint32 x) { + // Ugly but efficient return (x < 10 ? 1 : (x < 100 ? 2 : (x < 1000 ? 3 : diff --git a/src/NotepadNext/LineNumbers.h b/src/NotepadNext/plugins/LineNumbers.h similarity index 98% rename from src/NotepadNext/LineNumbers.h rename to src/NotepadNext/plugins/LineNumbers.h index 8ccb2491a..5b926023c 100644 --- a/src/NotepadNext/LineNumbers.h +++ b/src/NotepadNext/plugins/LineNumbers.h @@ -20,6 +20,8 @@ #ifndef LINENUMBERS_H #define LINENUMBERS_H +#include + #include "Plugin.h" class LineNumbers : public Plugin diff --git a/src/NotepadNext/Plugin.cpp b/src/NotepadNext/plugins/Plugin.cpp similarity index 100% rename from src/NotepadNext/Plugin.cpp rename to src/NotepadNext/plugins/Plugin.cpp diff --git a/src/NotepadNext/Plugin.h b/src/NotepadNext/plugins/Plugin.h similarity index 98% rename from src/NotepadNext/Plugin.h rename to src/NotepadNext/plugins/Plugin.h index 918b5f9b0..dd079849f 100644 --- a/src/NotepadNext/Plugin.h +++ b/src/NotepadNext/plugins/Plugin.h @@ -20,6 +20,8 @@ #ifndef PLUGIN_H #define PLUGIN_H +#include + #include "ScintillaEdit.h" class Plugin : public QObject diff --git a/src/NotepadNext/SmartHighlighter.cpp b/src/NotepadNext/plugins/SmartHighlighter.cpp similarity index 100% rename from src/NotepadNext/SmartHighlighter.cpp rename to src/NotepadNext/plugins/SmartHighlighter.cpp diff --git a/src/NotepadNext/SmartHighlighter.h b/src/NotepadNext/plugins/SmartHighlighter.h similarity index 100% rename from src/NotepadNext/SmartHighlighter.h rename to src/NotepadNext/plugins/SmartHighlighter.h diff --git a/src/NotepadNext/NppTabBar.cpp b/src/NotepadNext/widgets/NppTabBar.cpp similarity index 100% rename from src/NotepadNext/NppTabBar.cpp rename to src/NotepadNext/widgets/NppTabBar.cpp diff --git a/src/NotepadNext/NppTabBar.h b/src/NotepadNext/widgets/NppTabBar.h similarity index 100% rename from src/NotepadNext/NppTabBar.h rename to src/NotepadNext/widgets/NppTabBar.h diff --git a/src/NotepadNext/StatusLabel.cpp b/src/NotepadNext/widgets/StatusLabel.cpp similarity index 100% rename from src/NotepadNext/StatusLabel.cpp rename to src/NotepadNext/widgets/StatusLabel.cpp diff --git a/src/NotepadNext/StatusLabel.h b/src/NotepadNext/widgets/StatusLabel.h similarity index 100% rename from src/NotepadNext/StatusLabel.h rename to src/NotepadNext/widgets/StatusLabel.h diff --git a/src/NotepadNext/TabbedEditor.cpp b/src/NotepadNext/widgets/TabbedEditor.cpp similarity index 100% rename from src/NotepadNext/TabbedEditor.cpp rename to src/NotepadNext/widgets/TabbedEditor.cpp diff --git a/src/NotepadNext/TabbedEditor.h b/src/NotepadNext/widgets/TabbedEditor.h similarity index 100% rename from src/NotepadNext/TabbedEditor.h rename to src/NotepadNext/widgets/TabbedEditor.h From 2b2f793d54ee74f5ee79395a36a2a153cc26238d Mon Sep 17 00:00:00 2001 From: dail8859 Date: Wed, 8 Apr 2020 11:52:41 -0400 Subject: [PATCH 05/17] Remove reference to installoptions.ui --- installer/packages/app/meta/package.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/installer/packages/app/meta/package.xml b/installer/packages/app/meta/package.xml index d3d5d75d8..0033b7d71 100644 --- a/installer/packages/app/meta/package.xml +++ b/installer/packages/app/meta/package.xml @@ -8,7 +8,6 @@ - installoptions.ui targetwidget.ui From 4a5aa3f60f17184f1da6d3c52489f0aaab2a7ecd Mon Sep 17 00:00:00 2001 From: dail8859 Date: Wed, 8 Apr 2020 21:27:14 -0400 Subject: [PATCH 06/17] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9397ec5a2..bdb798a19 100644 --- a/README.md +++ b/README.md @@ -4,18 +4,18 @@ A cross-platform, reimplementation of Notepad++. -Though the application overall is stable and usable, it should not be considered for daily use and is missing most features. +Though the application overall is stable and usable, it should not be considered safe for critically important work. There are numerous bugs and half working implementations. Pull requests are greatly appreciated. ![screenshot](/doc/screenshot.png) # Development -Current development has been done using Visual Studio 2017 and Qt v5.13. Other platforms/compilers have not been tested but should be usable. +Current development has been done using Visual Studio 2017 and Qt v5.14. Other platforms/compilers have not been tested but should be usable. 1. Install Visual Studio 2017 (Community Edition is fine) 1. Download the [Qt Installer](https://www.qt.io/download-qt-installer) -1. Use the Qt Installer to install `Qt 5.13.X` (MSVC 2017 64-bit) and `Qt Creator` +1. Use the Qt Installer to install `Qt 5.14.X` (MSVC 2017 64-bit) and `Qt Creator` 1. Open `src/NotepadNext.pro` 1. Build/Run the project From a5e988edfba5a82425993042fc67581af94deaa8 Mon Sep 17 00:00:00 2001 From: dail8859 Date: Wed, 8 Apr 2020 21:29:46 -0400 Subject: [PATCH 07/17] Cleanup --- src/NotepadNext/BufferManager.h | 1 - src/NotepadNext/NotepadNextApplication.cpp | 1 - src/NotepadNext/dialogs/MainWindow.ui | 28 ++++++++-------------- 3 files changed, 10 insertions(+), 20 deletions(-) diff --git a/src/NotepadNext/BufferManager.h b/src/NotepadNext/BufferManager.h index 32db0a2cc..75e2fda38 100644 --- a/src/NotepadNext/BufferManager.h +++ b/src/NotepadNext/BufferManager.h @@ -24,7 +24,6 @@ #include #include -#include class BufferManager : public QObject { diff --git a/src/NotepadNext/NotepadNextApplication.cpp b/src/NotepadNext/NotepadNextApplication.cpp index 48b11a7aa..18d55c61a 100644 --- a/src/NotepadNext/NotepadNextApplication.cpp +++ b/src/NotepadNext/NotepadNextApplication.cpp @@ -153,7 +153,6 @@ MainWindow *NotepadNextApplication::createNewWindow() { MainWindow *w = new MainWindow(this); - // Save the window windows.append(w); w->initialize(settings); diff --git a/src/NotepadNext/dialogs/MainWindow.ui b/src/NotepadNext/dialogs/MainWindow.ui index 9964fc246..7fb13354e 100644 --- a/src/NotepadNext/dialogs/MainWindow.ui +++ b/src/NotepadNext/dialogs/MainWindow.ui @@ -442,7 +442,7 @@ - + :/icons/closeFile.png:/icons/closeFile.png @@ -470,7 +470,7 @@ - + :/icons/saveAll.png:/icons/saveAll.png @@ -490,7 +490,7 @@ - + :/icons/text_indent.png:/icons/text_indent.png @@ -499,7 +499,7 @@ - + :/icons/text_indent_remove.png:/icons/text_indent_remove.png @@ -583,7 +583,7 @@ - + :/icons/closeAll.png:/icons/closeAll.png @@ -724,14 +724,6 @@ Word Wrap - - - true - - - Show None - - Restore Recently Closed File @@ -818,7 +810,7 @@ true - + :/icons/startRecord.png :/icons/stopRecord.png:/icons/startRecord.png @@ -831,7 +823,7 @@ false - + :/icons/playRecord.png:/icons/playRecord.png @@ -846,7 +838,7 @@ false - + :/icons/saveRecord.png:/icons/saveRecord.png @@ -858,7 +850,7 @@ false - + :/icons/playRecord_m.png:/icons/playRecord_m.png @@ -881,7 +873,7 @@ - + From 3b8ec2ebf03384a98e64b6a54ed0530f0c8c3fed Mon Sep 17 00:00:00 2001 From: dail8859 Date: Wed, 8 Apr 2020 21:30:23 -0400 Subject: [PATCH 08/17] Cut/Copy allow line --- src/NotepadNext/dialogs/MainWindow.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/NotepadNext/dialogs/MainWindow.cpp b/src/NotepadNext/dialogs/MainWindow.cpp index 7863af279..c8bf69194 100644 --- a/src/NotepadNext/dialogs/MainWindow.cpp +++ b/src/NotepadNext/dialogs/MainWindow.cpp @@ -188,8 +188,19 @@ MainWindow::MainWindow(NotepadNextApplication *app, QWidget *parent) : connect(ui->actionUndo, &QAction::triggered, editor, &ScintillaNext::undo); connect(ui->actionRedo, &QAction::triggered, editor, &ScintillaNext::redo); - connect(ui->actionCut, &QAction::triggered, editor, &ScintillaNext::cut); - connect(ui->actionCopy, &QAction::triggered, editor, &ScintillaNext::copy); + connect(ui->actionCut, &QAction::triggered, [=]() { + qInfo("actionCut"); + if (editor->selectionEmpty()) { + editor->copyAllowLine(); + editor->lineDelete(); + } + else { + editor->cut(); + } + }); + connect(ui->actionCopy, &QAction::triggered, [=]() { + editor->copyAllowLine(); + }); connect(ui->actionPaste, &QAction::triggered, editor, &ScintillaNext::paste); connect(ui->actionSelect_All, &QAction::triggered, editor, &ScintillaNext::selectAll); connect(ui->actionCopyFullPath, &QAction::triggered, [=]() { @@ -587,7 +598,7 @@ void MainWindow::initialize(Settings *settings) this->settings = settings; connect(settings, &Settings::showMenuBarChanged, [=](bool showMenuBar) { - // Don't hide it else the actions won't be enabled + // Don't 'hide' it, else the actions won't be enabled ui->menuBar->setMaximumHeight(showMenuBar ? QWIDGETSIZE_MAX : 0); }); connect(settings, &Settings::showToolBarChanged, ui->mainToolBar, &QToolBar::setVisible); @@ -1371,8 +1382,6 @@ void MainWindow::updateSelectionBasedUi(int updated) if (updated & (SC_UPDATE_CONTENT | SC_UPDATE_SELECTION)) { bool hasAnySelections = !editor->selectionEmpty(); - ui->actionCut->setEnabled(hasAnySelections); - ui->actionCopy->setEnabled(hasAnySelections); ui->actionDelete->setEnabled(hasAnySelections); ui->actionPaste->setEnabled(editor->canPaste()); From ef60aae92986ab35fb75f7e90220e1e87f926c52 Mon Sep 17 00:00:00 2001 From: dail8859 Date: Wed, 8 Apr 2020 21:44:51 -0400 Subject: [PATCH 09/17] Update to Scintilla 4.3.2 --- src/Update Scintilla.md | 5 + src/scintilla/.hg_archival.txt | 4 +- src/scintilla/.hgignore | 3 + src/scintilla/.hgtags | 6 + src/scintilla/cocoa/InfoBar.h | 2 +- src/scintilla/cocoa/InfoBar.mm | 2 +- src/scintilla/cocoa/PlatCocoa.h | 1 + src/scintilla/cocoa/PlatCocoa.mm | 54 +- src/scintilla/cocoa/QuartzTextLayout.h | 4 +- src/scintilla/cocoa/QuartzTextStyle.h | 4 +- .../cocoa/QuartzTextStyleAttribute.h | 4 +- src/scintilla/cocoa/ScintillaCocoa.h | 5 - src/scintilla/cocoa/ScintillaCocoa.mm | 9 +- .../cocoa/ScintillaFramework/Info.plist | 4 +- .../project.pbxproj | 13 +- .../xcshareddata/xcschemes/Scintilla.xcscheme | 68 + src/scintilla/cocoa/ScintillaView.h | 1 + src/scintilla/cocoa/ScintillaView.mm | 1 + src/scintilla/cppcheck.suppress | 141 +- src/scintilla/doc/ScintillaDoc.html | 114 +- src/scintilla/doc/ScintillaDownload.html | 10 +- src/scintilla/doc/ScintillaHistory.html | 229 ++- src/scintilla/doc/ScintillaToDo.html | 24 +- src/scintilla/doc/index.html | 17 +- src/scintilla/gtk/Converter.h | 5 + src/scintilla/gtk/PlatGTK.cxx | 42 +- src/scintilla/gtk/ScintillaGTK.cxx | 64 +- src/scintilla/gtk/ScintillaGTK.h | 8 +- src/scintilla/gtk/ScintillaGTKAccessible.cxx | 8 +- src/scintilla/gtk/ScintillaGTKAccessible.h | 2 +- src/scintilla/gtk/deps.mak | 36 +- src/scintilla/include/ILexer.h | 9 +- src/scintilla/include/Platform.h | 4 +- src/scintilla/include/SciLexer.h | 46 + src/scintilla/include/Scintilla.h | 9 + src/scintilla/include/Scintilla.iface | 82 +- src/scintilla/lexers/LexASY.cxx | 1 + src/scintilla/lexers/LexAbaqus.cxx | 2 +- src/scintilla/lexers/LexAsm.cxx | 15 +- src/scintilla/lexers/LexBaan.cxx | 10 +- src/scintilla/lexers/LexBash.cxx | 9 +- src/scintilla/lexers/LexBasic.cxx | 21 +- src/scintilla/lexers/LexCIL.cxx | 10 +- src/scintilla/lexers/LexCLW.cxx | 2 +- src/scintilla/lexers/LexCPP.cxx | 21 +- src/scintilla/lexers/LexD.cxx | 10 +- src/scintilla/lexers/LexDMIS.cxx | 10 +- src/scintilla/lexers/LexEDIFACT.cxx | 26 +- src/scintilla/lexers/LexEScript.cxx | 2 +- src/scintilla/lexers/LexFlagship.cxx | 2 +- src/scintilla/lexers/LexGui4Cli.cxx | 1 + src/scintilla/lexers/LexHTML.cxx | 66 +- src/scintilla/lexers/LexHaskell.cxx | 13 +- src/scintilla/lexers/LexHollywood.cxx | 516 ++++++ src/scintilla/lexers/LexJSON.cxx | 8 +- src/scintilla/lexers/LexLaTeX.cxx | 10 +- src/scintilla/lexers/LexMetapost.cxx | 5 +- src/scintilla/lexers/LexNim.cxx | 10 +- src/scintilla/lexers/LexPLM.cxx | 1 + src/scintilla/lexers/LexPerl.cxx | 41 +- src/scintilla/lexers/LexProgress.cxx | 8 +- src/scintilla/lexers/LexProps.cxx | 18 +- src/scintilla/lexers/LexPython.cxx | 9 +- src/scintilla/lexers/LexR.cxx | 2 +- src/scintilla/lexers/LexRaku.cxx | 1605 +++++++++++++++++ src/scintilla/lexers/LexRegistry.cxx | 10 +- src/scintilla/lexers/LexRuby.cxx | 6 +- src/scintilla/lexers/LexRust.cxx | 9 +- src/scintilla/lexers/LexSQL.cxx | 10 +- src/scintilla/lexers/LexTACL.cxx | 4 +- src/scintilla/lexers/LexTCL.cxx | 5 +- src/scintilla/lexers/LexTeX.cxx | 2 +- src/scintilla/lexers/LexVerilog.cxx | 8 +- src/scintilla/lexers/LexVisualProlog.cxx | 9 +- src/scintilla/lexers/LexX12.cxx | 10 +- src/scintilla/lexilla/scripts/LexillaGen.py | 52 + src/scintilla/lexilla/scripts/RunTest.bat | 7 + src/scintilla/lexilla/src/DepGen.py | 40 + src/scintilla/lexilla/src/Lexilla.cxx | 338 ++++ src/scintilla/lexilla/src/Lexilla.h | 13 + src/scintilla/lexilla/src/LexillaVersion.rc | 37 + src/scintilla/lexilla/src/README | 42 + src/scintilla/lexilla/src/deps.mak | 1519 ++++++++++++++++ src/scintilla/lexilla/src/lexilla.mak | 224 +++ src/scintilla/lexilla/src/nmdeps.mak | 1519 ++++++++++++++++ src/scintilla/lexilla/test/LexillaAccess.cxx | 95 + src/scintilla/lexilla/test/LexillaAccess.h | 9 + src/scintilla/lexilla/test/README | 65 + src/scintilla/lexilla/test/TestDocument.cxx | 246 +++ src/scintilla/lexilla/test/TestDocument.h | 43 + src/scintilla/lexilla/test/TestLexers.cxx | 195 ++ src/scintilla/lexilla/test/TestLexers.vcxproj | 176 ++ .../test/examples/batch/SciTE.properties | 3 + .../lexilla/test/examples/batch/x.bat | 26 + .../lexilla/test/examples/batch/x.bat.styled | 26 + .../test/examples/cpp/SciTE.properties | 4 + src/scintilla/lexilla/test/examples/cpp/x.cxx | 16 + .../lexilla/test/examples/cpp/x.cxx.styled | 16 + .../lexilla/test/examples/d/SciTE.properties | 9 + src/scintilla/lexilla/test/examples/d/x.d | 47 + .../lexilla/test/examples/d/x.d.styled | 47 + .../test/examples/hypertext/SciTE.properties | 6 + .../test/examples/hypertext/apostophe.php | 11 + .../examples/hypertext/apostophe.php.styled | 11 + .../lexilla/test/examples/hypertext/x.asp | 12 + .../test/examples/hypertext/x.asp.styled | 12 + .../lexilla/test/examples/hypertext/x.html | 12 + .../test/examples/hypertext/x.html.styled | 12 + .../lexilla/test/examples/hypertext/x.php | 6 + .../test/examples/hypertext/x.php.styled | 6 + .../test/examples/lua/SciTE.properties | 2 + src/scintilla/lexilla/test/examples/lua/x.lua | 7 + .../lexilla/test/examples/lua/x.lua.styled | 7 + .../test/examples/nim/SciTE.properties | 2 + src/scintilla/lexilla/test/examples/nim/x.nim | 28 + .../lexilla/test/examples/nim/x.nim.styled | 28 + .../test/examples/perl/SciTE.properties | 31 + .../test/examples/perl/perl-test-5220delta.pl | 178 ++ .../perl/perl-test-5220delta.pl.styled | 178 ++ .../examples/perl/perl-test-sub-prototypes.pl | 239 +++ .../perl/perl-test-sub-prototypes.pl.styled | 239 +++ src/scintilla/lexilla/test/examples/perl/x.pl | 5 + .../lexilla/test/examples/perl/x.pl.styled | 5 + .../test/examples/python/SciTE.properties | 2 + .../lexilla/test/examples/python/x.py | 19 + .../lexilla/test/examples/python/x.py.styled | 19 + .../test/examples/raku/SciTE.properties | 113 ++ src/scintilla/lexilla/test/examples/raku/x.p6 | 54 + .../lexilla/test/examples/raku/x.p6.styled | 54 + .../test/examples/ruby/SciTE.properties | 2 + src/scintilla/lexilla/test/examples/ruby/x.rb | 6 + .../lexilla/test/examples/ruby/x.rb.styled | 6 + .../test/examples/tcl/SciTE.properties | 2 + src/scintilla/lexilla/test/examples/tcl/x.tcl | 13 + .../lexilla/test/examples/tcl/x.tcl.styled | 13 + .../lexilla/test/examples/vb/SciTE.properties | 2 + src/scintilla/lexilla/test/examples/vb/x.vb | 13 + .../lexilla/test/examples/vb/x.vb.styled | 13 + src/scintilla/lexilla/test/testlexers.mak | 40 + src/scintilla/lexilla/version.txt | 1 + src/scintilla/lexlib/CatalogueModules.h | 70 + src/scintilla/lexlib/CharacterCategory.cxx | 159 +- src/scintilla/lexlib/CharacterCategory.h | 2 +- src/scintilla/lexlib/DefaultLexer.cxx | 20 +- src/scintilla/lexlib/DefaultLexer.h | 10 +- src/scintilla/lexlib/LexerBase.cxx | 21 +- src/scintilla/lexlib/LexerBase.h | 6 +- src/scintilla/lexlib/LexerModule.cxx | 2 +- src/scintilla/lexlib/LexerModule.h | 12 +- src/scintilla/lexlib/LexerSimple.cxx | 8 + src/scintilla/lexlib/LexerSimple.h | 3 + src/scintilla/lexlib/OptionSet.h | 15 +- src/scintilla/lexlib/StyleContext.h | 4 +- src/scintilla/lexlib/WordList.cxx | 38 +- src/scintilla/lexlib/WordList.h | 2 +- .../qt/ScintillaEdit/ScintillaEdit.cpp | 36 + .../qt/ScintillaEdit/ScintillaEdit.h | 9 + .../qt/ScintillaEdit/ScintillaEdit.pro | 2 +- src/scintilla/qt/ScintillaEditBase/PlatQt.cpp | 38 +- src/scintilla/qt/ScintillaEditBase/PlatQt.h | 2 +- .../ScintillaEditBase/ScintillaEditBase.pro | 2 +- .../qt/ScintillaEditBase/ScintillaQt.cpp | 42 +- .../qt/ScintillaEditBase/ScintillaQt.h | 7 +- .../qt/ScintillaEditPy/ScintillaConstants.py | 46 + .../qt/ScintillaEditPy/ScintillaEditPy.pro | 2 +- src/scintilla/scripts/GenerateCaseConvert.py | 2 +- src/scintilla/scripts/HeaderCheck.py | 2 + src/scintilla/scripts/HeaderOrder.txt | 10 +- src/scintilla/scripts/ScintillaData.py | 5 +- src/scintilla/scripts/archive.sh | 5 + src/scintilla/src/CaseConvert.cxx | 8 +- src/scintilla/src/Catalogue.cxx | 40 +- src/scintilla/src/CellBuffer.cxx | 6 +- src/scintilla/src/Document.cxx | 2 +- src/scintilla/src/Document.h | 2 +- src/scintilla/src/Editor.cxx | 226 ++- src/scintilla/src/Editor.h | 51 +- src/scintilla/src/ExternalLexer.cxx | 103 +- src/scintilla/src/ExternalLexer.h | 58 +- src/scintilla/src/Partitioning.h | 34 +- src/scintilla/src/PerLine.cxx | 3 - src/scintilla/src/PositionCache.cxx | 2 +- src/scintilla/src/PositionCache.h | 2 +- src/scintilla/src/ScintillaBase.cxx | 52 +- src/scintilla/src/ScintillaBase.h | 5 - src/scintilla/src/Selection.cxx | 20 +- src/scintilla/src/Selection.h | 5 +- src/scintilla/src/SparseVector.h | 99 +- src/scintilla/src/SplitVector.h | 6 +- src/scintilla/src/XPM.cxx | 15 + src/scintilla/src/XPM.h | 2 + src/scintilla/test/XiteWin.py | 6 +- src/scintilla/test/examples/x.d | 47 + src/scintilla/test/simpleTests.py | 209 ++- src/scintilla/test/unit/Sci.natvis | 33 +- src/scintilla/test/unit/UnitTester.vcxproj | 8 +- .../test/unit/testContractionState.cxx | 6 + src/scintilla/test/unit/testSparseVector.cxx | 196 +- src/scintilla/test/unit/testWordList.cxx | 15 + src/scintilla/tgzsrc | 2 +- src/scintilla/version.txt | 2 +- src/scintilla/win32/DepGen.py | 4 +- src/scintilla/win32/PlatWin.cxx | 181 +- src/scintilla/win32/PlatWin.h | 16 + src/scintilla/win32/SciLexer.vcxproj | 40 +- src/scintilla/win32/ScintRes.rc | 4 +- src/scintilla/win32/ScintillaWin.cxx | 1460 +++++++-------- src/scintilla/win32/ScintillaWin.h | 5 + src/scintilla/win32/deps.mak | 88 +- src/scintilla/win32/nmdeps.mak | 88 +- src/scintilla/win32/scintilla.mak | 86 +- 211 files changed, 12007 insertions(+), 1602 deletions(-) create mode 100644 src/Update Scintilla.md create mode 100644 src/scintilla/cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/xcshareddata/xcschemes/Scintilla.xcscheme create mode 100644 src/scintilla/lexers/LexHollywood.cxx create mode 100644 src/scintilla/lexers/LexRaku.cxx create mode 100644 src/scintilla/lexilla/scripts/LexillaGen.py create mode 100644 src/scintilla/lexilla/scripts/RunTest.bat create mode 100644 src/scintilla/lexilla/src/DepGen.py create mode 100644 src/scintilla/lexilla/src/Lexilla.cxx create mode 100644 src/scintilla/lexilla/src/Lexilla.h create mode 100644 src/scintilla/lexilla/src/LexillaVersion.rc create mode 100644 src/scintilla/lexilla/src/README create mode 100644 src/scintilla/lexilla/src/deps.mak create mode 100644 src/scintilla/lexilla/src/lexilla.mak create mode 100644 src/scintilla/lexilla/src/nmdeps.mak create mode 100644 src/scintilla/lexilla/test/LexillaAccess.cxx create mode 100644 src/scintilla/lexilla/test/LexillaAccess.h create mode 100644 src/scintilla/lexilla/test/README create mode 100644 src/scintilla/lexilla/test/TestDocument.cxx create mode 100644 src/scintilla/lexilla/test/TestDocument.h create mode 100644 src/scintilla/lexilla/test/TestLexers.cxx create mode 100644 src/scintilla/lexilla/test/TestLexers.vcxproj create mode 100644 src/scintilla/lexilla/test/examples/batch/SciTE.properties create mode 100644 src/scintilla/lexilla/test/examples/batch/x.bat create mode 100644 src/scintilla/lexilla/test/examples/batch/x.bat.styled create mode 100644 src/scintilla/lexilla/test/examples/cpp/SciTE.properties create mode 100644 src/scintilla/lexilla/test/examples/cpp/x.cxx create mode 100644 src/scintilla/lexilla/test/examples/cpp/x.cxx.styled create mode 100644 src/scintilla/lexilla/test/examples/d/SciTE.properties create mode 100644 src/scintilla/lexilla/test/examples/d/x.d create mode 100644 src/scintilla/lexilla/test/examples/d/x.d.styled create mode 100644 src/scintilla/lexilla/test/examples/hypertext/SciTE.properties create mode 100644 src/scintilla/lexilla/test/examples/hypertext/apostophe.php create mode 100644 src/scintilla/lexilla/test/examples/hypertext/apostophe.php.styled create mode 100644 src/scintilla/lexilla/test/examples/hypertext/x.asp create mode 100644 src/scintilla/lexilla/test/examples/hypertext/x.asp.styled create mode 100644 src/scintilla/lexilla/test/examples/hypertext/x.html create mode 100644 src/scintilla/lexilla/test/examples/hypertext/x.html.styled create mode 100644 src/scintilla/lexilla/test/examples/hypertext/x.php create mode 100644 src/scintilla/lexilla/test/examples/hypertext/x.php.styled create mode 100644 src/scintilla/lexilla/test/examples/lua/SciTE.properties create mode 100644 src/scintilla/lexilla/test/examples/lua/x.lua create mode 100644 src/scintilla/lexilla/test/examples/lua/x.lua.styled create mode 100644 src/scintilla/lexilla/test/examples/nim/SciTE.properties create mode 100644 src/scintilla/lexilla/test/examples/nim/x.nim create mode 100644 src/scintilla/lexilla/test/examples/nim/x.nim.styled create mode 100644 src/scintilla/lexilla/test/examples/perl/SciTE.properties create mode 100644 src/scintilla/lexilla/test/examples/perl/perl-test-5220delta.pl create mode 100644 src/scintilla/lexilla/test/examples/perl/perl-test-5220delta.pl.styled create mode 100644 src/scintilla/lexilla/test/examples/perl/perl-test-sub-prototypes.pl create mode 100644 src/scintilla/lexilla/test/examples/perl/perl-test-sub-prototypes.pl.styled create mode 100644 src/scintilla/lexilla/test/examples/perl/x.pl create mode 100644 src/scintilla/lexilla/test/examples/perl/x.pl.styled create mode 100644 src/scintilla/lexilla/test/examples/python/SciTE.properties create mode 100644 src/scintilla/lexilla/test/examples/python/x.py create mode 100644 src/scintilla/lexilla/test/examples/python/x.py.styled create mode 100644 src/scintilla/lexilla/test/examples/raku/SciTE.properties create mode 100644 src/scintilla/lexilla/test/examples/raku/x.p6 create mode 100644 src/scintilla/lexilla/test/examples/raku/x.p6.styled create mode 100644 src/scintilla/lexilla/test/examples/ruby/SciTE.properties create mode 100644 src/scintilla/lexilla/test/examples/ruby/x.rb create mode 100644 src/scintilla/lexilla/test/examples/ruby/x.rb.styled create mode 100644 src/scintilla/lexilla/test/examples/tcl/SciTE.properties create mode 100644 src/scintilla/lexilla/test/examples/tcl/x.tcl create mode 100644 src/scintilla/lexilla/test/examples/tcl/x.tcl.styled create mode 100644 src/scintilla/lexilla/test/examples/vb/SciTE.properties create mode 100644 src/scintilla/lexilla/test/examples/vb/x.vb create mode 100644 src/scintilla/lexilla/test/examples/vb/x.vb.styled create mode 100644 src/scintilla/lexilla/test/testlexers.mak create mode 100644 src/scintilla/lexilla/version.txt create mode 100644 src/scintilla/lexlib/CatalogueModules.h create mode 100644 src/scintilla/scripts/archive.sh create mode 100644 src/scintilla/test/examples/x.d diff --git a/src/Update Scintilla.md b/src/Update Scintilla.md new file mode 100644 index 000000000..0f50e0567 --- /dev/null +++ b/src/Update Scintilla.md @@ -0,0 +1,5 @@ +1. Delete files in src\scintilla +1. Copy new files over +1. Run python src\scintilla\qt\ScintillaEdit\WidgetGen.py +1. Revert any un-needed changes in ScintillaEdit.pro +1. Update ScintillaDocument.cpp/h \ No newline at end of file diff --git a/src/scintilla/.hg_archival.txt b/src/scintilla/.hg_archival.txt index 6b578daf0..4e443bc3a 100644 --- a/src/scintilla/.hg_archival.txt +++ b/src/scintilla/.hg_archival.txt @@ -1,6 +1,6 @@ repo: bdf8c3ef2fb01ea24578e726337888e706d10b92 -node: 62b5326b2e9d6295270e7c8bcb6e21dff8b2ac06 +node: 91340ea3f89e7ff4b637cd88c56bc27713107e32 branch: default -latesttag: rel-4-2-0 +latesttag: rel-4-3-2 latesttagdistance: 1 changessincelatesttag: 1 diff --git a/src/scintilla/.hgignore b/src/scintilla/.hgignore index 3099a3a9d..33f9353e2 100644 --- a/src/scintilla/.hgignore +++ b/src/scintilla/.hgignore @@ -5,6 +5,7 @@ syntax: glob *.lib *.obj *.iobj +__pycache__ *.pyc *.dll *.dylib @@ -19,6 +20,8 @@ syntax: glob *.bak *.sbr *.suo +*.aps +*.vcxproj.* *.idb *.bsc *.intermediate.manifest diff --git a/src/scintilla/.hgtags b/src/scintilla/.hgtags index 3883f1e26..589ad61a9 100644 --- a/src/scintilla/.hgtags +++ b/src/scintilla/.hgtags @@ -155,3 +155,9 @@ cd35899fef5ea18e099c61577daf1133cd21bed4 rel-4-1-4 6ccb029fd955cc69c186acd5b3e677e01f4590e3 rel-4-1-6 8fdc0159b0df23b8b1d5abc31c80b757aa206a44 rel-4-1-7 70fe3bd38a3d8567acdb57a7d554f3c78aea6315 rel-4-2-0 +4f8c3b19095af4f0d333f1b6aa1ff1e3a69d9f4c rel-4-2-1 +1b8ce5991cb9e5c27fe2701e6d61c35e697e7207 rel-4-2-2 +01a9cbbef0f001bc38bead54c9e993e1f35c3977 rel-4-2-3 +7137777f9be8bbdd6eacf3b17b6778eb2e7fa4fe rel-4-3-0 +32e2c934bcc6d09c711958eab8e924851fd82bd3 rel-4-3-1 +c4e53c985ef6fdf0c4ef660a8c39d8976c42a921 rel-4-3-2 diff --git a/src/scintilla/cocoa/InfoBar.h b/src/scintilla/cocoa/InfoBar.h index 382e65a9c..17b543f3b 100644 --- a/src/scintilla/cocoa/InfoBar.h +++ b/src/scintilla/cocoa/InfoBar.h @@ -1,7 +1,7 @@ /** * Scintilla source code edit control - * InfoBar.h - Implements special info bar with zoom info, caret position etc. to be used with + * @file InfoBar.h - Implements special info bar with zoom info, caret position etc. to be used with * ScintillaView. * * Mike Lischke diff --git a/src/scintilla/cocoa/InfoBar.mm b/src/scintilla/cocoa/InfoBar.mm index db30dd134..11d148fb8 100644 --- a/src/scintilla/cocoa/InfoBar.mm +++ b/src/scintilla/cocoa/InfoBar.mm @@ -1,7 +1,7 @@ /** * Scintilla source code edit control - * InfoBar.mm - Implements special info bar with zoom info, caret position etc. to be used with + * @file InfoBar.mm - Implements special info bar with zoom info, caret position etc. to be used with * ScintillaView. * * Mike Lischke diff --git a/src/scintilla/cocoa/PlatCocoa.h b/src/scintilla/cocoa/PlatCocoa.h index 7dbc32487..6133b3a25 100644 --- a/src/scintilla/cocoa/PlatCocoa.h +++ b/src/scintilla/cocoa/PlatCocoa.h @@ -2,6 +2,7 @@ /** * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt). + * @file PlatCocoa.h */ #ifndef PLATCOCOA_H diff --git a/src/scintilla/cocoa/PlatCocoa.mm b/src/scintilla/cocoa/PlatCocoa.mm index 71c078bab..62d18273c 100644 --- a/src/scintilla/cocoa/PlatCocoa.mm +++ b/src/scintilla/cocoa/PlatCocoa.mm @@ -1,6 +1,6 @@ /** * Scintilla source code edit control - * PlatCocoa.mm - implementation of platform facilities on MacOS X/Cocoa + * @file PlatCocoa.mm - implementation of platform facilities on MacOS X/Cocoa * * Written by Mike Lischke * Based on PlatMacOSX.cxx @@ -27,6 +27,7 @@ #include #include +#include #include #import @@ -2132,14 +2133,51 @@ - (void) setOwner: (Scintilla::ScintillaCocoa *) newOwner { //----------------- DynamicLibrary ----------------------------------------------------------------- /** - * Implements the platform specific part of library loading. - * - * @param modulePath The path to the module to load. - * @return A library instance or nullptr if the module could not be found or another problem occurred. + * Platform-specific module loading and access. + * Uses POSIX calls dlopen, dlsym, dlclose. */ -DynamicLibrary *DynamicLibrary::Load(const char * /* modulePath */) { - // Not implemented. - return nullptr; + +class DynamicLibraryImpl : public DynamicLibrary { +protected: + void *m; +public: + explicit DynamicLibraryImpl(const char *modulePath) noexcept { + m = dlopen(modulePath, RTLD_LAZY); + } + // Deleted so DynamicLibraryImpl objects can not be copied. + DynamicLibraryImpl(const DynamicLibraryImpl&) = delete; + DynamicLibraryImpl(DynamicLibraryImpl&&) = delete; + DynamicLibraryImpl&operator=(const DynamicLibraryImpl&) = delete; + DynamicLibraryImpl&operator=(DynamicLibraryImpl&&) = delete; + + ~DynamicLibraryImpl() override { + if (m) + dlclose(m); + } + + // Use dlsym to get a pointer to the relevant function. + Function FindFunction(const char *name) override { + if (m) { + return dlsym(m, name); + } else { + return nullptr; + } + } + + bool IsValid() override { + return m != nullptr; + } +}; + +/** +* Implements the platform specific part of library loading. +* +* @param modulePath The path to the module to load. +* @return A library instance or nullptr if the module could not be found or another problem occurred. +*/ + +DynamicLibrary *DynamicLibrary::Load(const char *modulePath) { + return static_cast(new DynamicLibraryImpl(modulePath)); } //-------------------------------------------------------------------------------------------------- diff --git a/src/scintilla/cocoa/QuartzTextLayout.h b/src/scintilla/cocoa/QuartzTextLayout.h index 62e695525..0c6eb08dd 100644 --- a/src/scintilla/cocoa/QuartzTextLayout.h +++ b/src/scintilla/cocoa/QuartzTextLayout.h @@ -8,8 +8,8 @@ * */ -#ifndef _QUARTZ_TEXT_LAYOUT_H -#define _QUARTZ_TEXT_LAYOUT_H +#ifndef QUARTZTEXTLAYOUT_H +#define QUARTZTEXTLAYOUT_H #include diff --git a/src/scintilla/cocoa/QuartzTextStyle.h b/src/scintilla/cocoa/QuartzTextStyle.h index 57ea6c7a3..3c5684685 100644 --- a/src/scintilla/cocoa/QuartzTextStyle.h +++ b/src/scintilla/cocoa/QuartzTextStyle.h @@ -5,8 +5,8 @@ * */ -#ifndef _QUARTZ_TEXT_STYLE_H -#define _QUARTZ_TEXT_STYLE_H +#ifndef QUARTZTEXTSTYLE_H +#define QUARTZTEXTSTYLE_H #include "QuartzTextStyleAttribute.h" diff --git a/src/scintilla/cocoa/QuartzTextStyleAttribute.h b/src/scintilla/cocoa/QuartzTextStyleAttribute.h index b916c7a2f..a71049036 100644 --- a/src/scintilla/cocoa/QuartzTextStyleAttribute.h +++ b/src/scintilla/cocoa/QuartzTextStyleAttribute.h @@ -9,8 +9,8 @@ */ -#ifndef _QUARTZ_TEXT_STYLE_ATTRIBUTE_H -#define _QUARTZ_TEXT_STYLE_ATTRIBUTE_H +#ifndef QUARTZTEXTSTYLEATTRIBUTE_H +#define QUARTZTEXTSTYLEATTRIBUTE_H class QuartzFont { public: diff --git a/src/scintilla/cocoa/ScintillaCocoa.h b/src/scintilla/cocoa/ScintillaCocoa.h index 0eb758ddc..6d446a9bf 100644 --- a/src/scintilla/cocoa/ScintillaCocoa.h +++ b/src/scintilla/cocoa/ScintillaCocoa.h @@ -27,11 +27,6 @@ #include "ILoader.h" #include "ILexer.h" -#ifdef SCI_LEXER -#include "SciLexer.h" -#include "PropSetSimple.h" -#endif - #include "CharacterCategory.h" #include "Position.h" #include "UniqueString.h" diff --git a/src/scintilla/cocoa/ScintillaCocoa.mm b/src/scintilla/cocoa/ScintillaCocoa.mm index bc6bb3698..6c975beb3 100644 --- a/src/scintilla/cocoa/ScintillaCocoa.mm +++ b/src/scintilla/cocoa/ScintillaCocoa.mm @@ -1,7 +1,7 @@ /** * Scintilla source code edit control - * ScintillaCocoa.mm - Cocoa subclass of ScintillaBase + * @file ScintillaCocoa.mm - Cocoa subclass of ScintillaBase * * Written by Mike Lischke * @@ -423,7 +423,6 @@ - (void) idleTriggered: (NSNotification *) notification { * Core initialization of the control. Everything that needs to be set up happens here. */ void ScintillaCocoa::Init() { - Scintilla_LinkLexers(); // Tell Scintilla not to buffer: Quartz buffers drawing for us. WndProc(SCI_SETBUFFEREDDRAW, 0, 0); @@ -1598,15 +1597,15 @@ - (void) pasteboard: (NSPasteboard *) pasteboard item: (NSPasteboardItem *) item // Returns the target converted to UTF8. // Return the length in bytes. Sci::Position ScintillaCocoa::TargetAsUTF8(char *text) const { - const Sci::Position targetLength = targetEnd - targetStart; + const Sci::Position targetLength = targetRange.Length(); if (IsUnicodeMode()) { if (text) - pdoc->GetCharRange(text, targetStart, targetLength); + pdoc->GetCharRange(text, targetRange.start.Position(), targetLength); } else { // Need to convert const CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(), vs.styles[STYLE_DEFAULT].characterSet); - const std::string s = RangeText(targetStart, targetEnd); + const std::string s = RangeText(targetRange.start.Position(), targetRange.end.Position()); CFStringRef cfsVal = CFStringFromString(s.c_str(), s.length(), encoding); if (!cfsVal) { return 0; diff --git a/src/scintilla/cocoa/ScintillaFramework/Info.plist b/src/scintilla/cocoa/ScintillaFramework/Info.plist index 5d376541f..1c41cb718 100644 --- a/src/scintilla/cocoa/ScintillaFramework/Info.plist +++ b/src/scintilla/cocoa/ScintillaFramework/Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.2.0 + 4.3.2 CFBundleSignature ???? CFBundleVersion - 4.2.0 + 4.3.2 NSPrincipalClass diff --git a/src/scintilla/cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj b/src/scintilla/cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj index 9a19e7067..7c2da51d5 100644 --- a/src/scintilla/cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj +++ b/src/scintilla/cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj @@ -234,6 +234,8 @@ FDC7442CAD70B9A67EF1639D /* LexSAS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = A95147A1AB7CADB00DAFE724 /* LexSAS.cxx */; }; AE894E1CB7328CAE5B2EF47E /* LexX12.cxx in Sources */ = {isa = PBXBuildFile; fileRef = ADA64364A443F3E3F02D294E /* LexX12.cxx */; }; 902B40FE926FE48538B168F1 /* LexDataflex.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 362E48F5A7F79598CB0B037D /* LexDataflex.cxx */; }; + 4AA242EE8F0CCEA01AB59842 /* LexHollywood.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 96884184929F317E72FC1BE8 /* LexHollywood.cxx */; }; + 513A4B43B903344E142C441E /* LexRaku.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 48484CD7A1F20D09703376E5 /* LexRaku.cxx */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -471,6 +473,8 @@ D2F7E79907B2D74100F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; ADA64364A443F3E3F02D294E /* LexX12.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexX12.cxx; path = ../../lexers/LexX12.cxx; sourceTree = SOURCE_ROOT; }; 362E48F5A7F79598CB0B037D /* LexDataflex.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexDataflex.cxx; path = ../../lexers/LexDataflex.cxx; sourceTree = SOURCE_ROOT; }; + 96884184929F317E72FC1BE8 /* LexHollywood.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexHollywood.cxx; path = ../../lexers/LexHollywood.cxx; sourceTree = SOURCE_ROOT; }; + 48484CD7A1F20D09703376E5 /* LexRaku.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRaku.cxx; path = ../../lexers/LexRaku.cxx; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -613,6 +617,7 @@ 114B6EDB11FA7526004FB6AB /* LexGui4Cli.cxx */, 114B6EDC11FA7526004FB6AB /* LexHaskell.cxx */, 28A067101A36B42600B4966A /* LexHex.cxx */, + 96884184929F317E72FC1BE8 /* LexHollywood.cxx */, 114B6EDD11FA7526004FB6AB /* LexHTML.cxx */, 282E41F3B9E2BFEDD6A05BE7 /* LexIndent.cxx */, 114B6EDE11FA7526004FB6AB /* LexInno.cxx */, @@ -653,6 +658,7 @@ 114B6EF711FA7526004FB6AB /* LexPS.cxx */, 114B6EF811FA7526004FB6AB /* LexPython.cxx */, 114B6EF911FA7526004FB6AB /* LexR.cxx */, + 48484CD7A1F20D09703376E5 /* LexRaku.cxx */, 114B6EFA11FA7526004FB6AB /* LexRebol.cxx */, 28A7D6041995E47D0062D204 /* LexRegistry.cxx */, 114B6EFB11FA7526004FB6AB /* LexRuby.cxx */, @@ -1138,6 +1144,8 @@ 00724A59981D34F11A3D162F /* LexCIL.cxx in Sources */, AE894E1CB7328CAE5B2EF47E /* LexX12.cxx in Sources */, 902B40FE926FE48538B168F1 /* LexDataflex.cxx in Sources */, + 4AA242EE8F0CCEA01AB59842 /* LexHollywood.cxx in Sources */, + 513A4B43B903344E142C441E /* LexRaku.cxx in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1204,7 +1212,10 @@ GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Scintilla_Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = SCI_LEXER; + GCC_PREPROCESSOR_DEFINITIONS = ( + SCI_LEXER, + NDEBUG, + ); GCC_WARN_UNINITIALIZED_AUTOS = NO; GCC_WARN_UNKNOWN_PRAGMAS = YES; GCC_WARN_UNUSED_FUNCTION = YES; diff --git a/src/scintilla/cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/xcshareddata/xcschemes/Scintilla.xcscheme b/src/scintilla/cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/xcshareddata/xcschemes/Scintilla.xcscheme new file mode 100644 index 000000000..3f4768951 --- /dev/null +++ b/src/scintilla/cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/xcshareddata/xcschemes/Scintilla.xcscheme @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/scintilla/cocoa/ScintillaView.h b/src/scintilla/cocoa/ScintillaView.h index 8bf10c8e4..d6ef8b23c 100644 --- a/src/scintilla/cocoa/ScintillaView.h +++ b/src/scintilla/cocoa/ScintillaView.h @@ -1,6 +1,7 @@ /** * Declaration of the native Cocoa View that serves as container for the scintilla parts. + * @file ScintillaView.h * * Created by Mike Lischke. * diff --git a/src/scintilla/cocoa/ScintillaView.mm b/src/scintilla/cocoa/ScintillaView.mm index 7d9e7780b..9657886e2 100644 --- a/src/scintilla/cocoa/ScintillaView.mm +++ b/src/scintilla/cocoa/ScintillaView.mm @@ -1,6 +1,7 @@ /** * Implementation of the native Cocoa View that serves as container for the scintilla parts. + * @file ScintillaView.mm * * Created by Mike Lischke. * diff --git a/src/scintilla/cppcheck.suppress b/src/scintilla/cppcheck.suppress index a3e5dc07e..b6bd236ed 100644 --- a/src/scintilla/cppcheck.suppress +++ b/src/scintilla/cppcheck.suppress @@ -1,6 +1,10 @@ // File to suppress cppcheck warnings for files that will not be fixed. // Does not suppress warnings where an additional occurrence of the warning may be of interest. +// unreadVariable has expanded in cppcheck 1.90 to match assigning a struct then reading +// only from members which is a common idiom +unreadVariable + // Coding style is to use assignments in constructor when there are many // members to initialize or the initialization is complex or has comments. useInitializationList @@ -10,18 +14,25 @@ useInitializationList // produces same result on empty collections useStlAlgorithm +// Currently shift by word size is implementation defined but is OK on all used compilers +// In C++20, it will be well-defined. +shiftTooManyBitsSigned + // The two sections are for different purposes: C1 control set and UTF-8 invalid bytes duplicateCondition:scintilla/src/Editor.cxx // Some non-explicit constructors are used for conversions or are private to lexers noExplicitConstructor -// Document is checking for a change by called methods and cppcheck isn't considering escape -knownConditionTrueFalse:scintilla/src/Document.cxx +// MarginView access to all bits is safe and is better defined in later versions of C++ +shiftTooManyBitsSigned:scintilla/src/MarginView.cxx // ScintillaDocument is providing an API and there are no consumers of the API inside Scintilla unusedFunction:scintilla/qt/ScintillaEdit/ScintillaDocument.cpp +// moc_ files show #error as they are not built with standard context +preprocessorErrorDirective:scintilla/qt/*.cpp + // moc_ files are not understood by cppcheck noValidConfiguration @@ -31,50 +42,162 @@ passedByValue // Suppress most lexer warnings since the lexers are maintained by others redundantCondition:scintilla/lexers/LexA68k.cxx -shadowVar:scintilla/lexers/LexAU3.cxx +constParameter:scintilla/lexers/LexAbaqus.cxx +constParameter:scintilla/lexers/LexAda.cxx +constParameter:scintilla/lexers/LexAsn1.cxx +compareBoolExpressionWithInt:scintilla/lexers/LexAU3.cxx +knownConditionTrueFalse:scintilla/lexers/LexAU3.cxx +shadowVariable:scintilla/lexers/LexAU3.cxx +constParameter:scintilla/lexers/LexBaan.cxx unreadVariable:scintilla/lexers/LexBaan.cxx +constParameter:scintilla/lexers/LexBash.cxx uninitMemberVar:scintilla/lexers/LexBash.cxx variableScope:scintilla/lexers/LexBash.cxx variableScope:scintilla/lexers/LexBatch.cxx +constParameter:scintilla/lexers/LexBullant.cxx variableScope:scintilla/lexers/LexCmake.cxx +constParameter:scintilla/lexers/LexCLW.cxx +constParameter:scintilla/lexers/LexCOBOL.cxx +constParameter:scintilla/lexers/LexCoffeeScript.cxx +constParameter:scintilla/lexers/LexCPP.cxx variableScope:scintilla/lexers/LexCSS.cxx +constParameter:scintilla/lexers/LexDataflex.cxx variableScope:scintilla/lexers/LexDataflex.cxx +knownConditionTrueFalse:scintilla/lexers/LexECL.cxx +constParameter:scintilla/lexers/LexEiffel.cxx variableScope:scintilla/lexers/LexErlang.cxx +knownConditionTrueFalse:scintilla/lexers/LexEScript.cxx +constParameter:scintilla/lexers/LexFortran.cxx variableScope:scintilla/lexers/LexGui4Cli.cxx +constParameter:scintilla/lexers/LexHaskell.cxx +constParameter:scintilla/lexers/LexHex.cxx +constParameter:scintilla/lexers/LexHTML.cxx variableScope:scintilla/lexers/LexInno.cxx +constParameter:scintilla/lexers/LexJSON.cxx variableScope:scintilla/lexers/LexLaTeX.cxx +constParameter:scintilla/lexers/LexLaTeX.cxx +constParameter:scintilla/lexers/LexLisp.cxx +constParameter:scintilla/lexers/LexMagik.cxx +constParameter:scintilla/lexers/LexMatlab.cxx unreadVariable:scintilla/lexers/LexMatlab.cxx variableScope:scintilla/lexers/LexMetapost.cxx +constParameter:scintilla/lexers/LexModula.cxx variableScope:scintilla/lexers/LexModula.cxx variableScope:scintilla/lexers/LexMSSQL.cxx +shadowArgument:scintilla/lexers/LexMySQL.cxx +constParameter:scintilla/lexers/LexNim.cxx +constParameter:scintilla/lexers/LexNimrod.cxx variableScope:scintilla/lexers/LexNimrod.cxx variableScope:scintilla/lexers/LexNsis.cxx variableScope:scintilla/lexers/LexOpal.cxx +constParameter:scintilla/lexers/LexOScript.cxx +constParameter:scintilla/lexers/LexPascal.cxx variableScope:scintilla/lexers/LexPB.cxx -shadowVar:scintilla/lexers/LexPowerPro.cxx +constParameter:scintilla/lexers/LexPerl.cxx +constParameter:scintilla/lexers/LexPLM.cxx +constParameter:scintilla/lexers/LexPython.cxx +shadowVariable:scintilla/lexers/LexPowerPro.cxx +constParameter:scintilla/lexers/LexProgress.cxx variableScope:scintilla/lexers/LexProgress.cxx -redundantAssignment:scintilla/lexers/LexRegistry.cxx +constParameter:scintilla/lexers/LexRaku.cxx +variableScope:scintilla/lexers/LexRaku.cxx +redundantInitialization:scintilla/lexers/LexRegistry.cxx +constParameter:scintilla/lexers/LexRuby.cxx variableScope:scintilla/lexers/LexRuby.cxx uninitMemberVar:scintilla/lexers/LexRuby.cxx +constParameter:scintilla/lexers/LexRust.cxx +constParameter:scintilla/lexers/LexScriptol.cxx variableScope:scintilla/lexers/LexSpecman.cxx +constParameter:scintilla/lexers/LexSpice.cxx unreadVariable:scintilla/lexers/LexSpice.cxx +constParameter:scintilla/lexers/LexSTTXT.cxx +constParameter:scintilla/lexers/LexTACL.cxx +knownConditionTrueFalse:scintilla/lexers/LexTACL.cxx clarifyCalculation:scintilla/lexers/LexTADS3.cxx +constParameter:scintilla/lexers/LexTADS3.cxx +constParameter:scintilla/lexers/LexTAL.cxx invalidscanf:scintilla/lexers/LexTCMD.cxx knownConditionTrueFalse:scintilla/lexers/LexTCMD.cxx +constParameter:scintilla/lexers/LexTeX.cxx variableScope:scintilla/lexers/LexTeX.cxx +constParameter:scintilla/lexers/LexVB.cxx knownConditionTrueFalse:scintilla/lexers/LexVerilog.cxx constArgument:scintilla/lexers/LexVerilog.cxx -shadowVar:scintilla/lexers/LexVHDL.cxx +constParameter:scintilla/lexers/LexVerilog.cxx +constParameter:scintilla/lexers/LexVHDL.cxx +shadowVariable:scintilla/lexers/LexVHDL.cxx unreadVariable:scintilla/lexers/LexVHDL.cxx variableScope:scintilla/lexers/LexVHDL.cxx unreadVariable:scintilla/lexers/LexVisualProlog.cxx +constParameter:scintilla/lexers/LexYAML.cxx + +constVariable:scintilla/lexers/LexA68k.cxx +constVariable:scintilla/lexers/LexAPDL.cxx +constVariable:scintilla/lexers/LexASY.cxx +constVariable:scintilla/lexers/LexAU3.cxx +constVariable:scintilla/lexers/LexAVE.cxx +constVariable:scintilla/lexers/LexAVS.cxx +constVariable:scintilla/lexers/LexAsn1.cxx +constVariable:scintilla/lexers/LexBibTeX.cxx +constVariable:scintilla/lexers/LexBatch.cxx +constVariable:scintilla/lexers/LexCLW.cxx +constVariable:scintilla/lexers/LexCOBOL.cxx +constVariable:scintilla/lexers/LexCSS.cxx +constVariable:scintilla/lexers/LexCaml.cxx +constVariable:scintilla/lexers/LexCmake.cxx +constVariable:scintilla/lexers/LexCoffeeScript.cxx +constVariable:scintilla/lexers/LexConf.cxx +constVariable:scintilla/lexers/LexCrontab.cxx +constVariable:scintilla/lexers/LexCsound.cxx +constVariable:scintilla/lexers/LexDMAP.cxx +constVariable:scintilla/lexers/LexDataflex.cxx +constVariable:scintilla/lexers/LexECL.cxx +constVariable:scintilla/lexers/LexEScript.cxx +constVariable:scintilla/lexers/LexEiffel.cxx +constVariable:scintilla/lexers/LexErlang.cxx +constVariable:scintilla/lexers/LexFlagship.cxx +constVariable:scintilla/lexers/LexForth.cxx +constVariable:scintilla/lexers/LexGAP.cxx +constVariable:scintilla/lexers/LexFortran.cxx +constVariable:scintilla/lexers/LexGui4Cli.cxx +constVariable:scintilla/lexers/LexInno.cxx +constVariable:scintilla/lexers/LexKVIrc.cxx +constVariable:scintilla/lexers/LexKix.cxx +constVariable:scintilla/lexers/LexLout.cxx +constVariable:scintilla/lexers/LexMetapost.cxx +constVariable:scintilla/lexers/LexMMIXAL.cxx +constVariable:scintilla/lexers/LexMSSQL.cxx +constVariable:scintilla/lexers/LexMagik.cxx +constVariable:scintilla/lexers/LexMatlab.cxx +constVariable:scintilla/lexers/LexModula.cxx +constVariable:scintilla/lexers/LexNsis.cxx +constVariable:scintilla/lexers/LexOpal.cxx +constVariable:scintilla/lexers/LexPB.cxx +constVariable:scintilla/lexers/LexPerl.cxx +constVariable:scintilla/lexers/LexPOV.cxx +constVariable:scintilla/lexers/LexPS.cxx +constVariable:scintilla/lexers/LexPascal.cxx +constVariable:scintilla/lexers/LexPowerPro.cxx +constVariable:scintilla/lexers/LexPowerShell.cxx +constVariable:scintilla/lexers/LexR.cxx +constVariable:scintilla/lexers/LexRebol.cxx +constVariable:scintilla/lexers/LexSAS.cxx +constVariable:scintilla/lexers/LexSML.cxx +constVariable:scintilla/lexers/LexSorcus.cxx +constVariable:scintilla/lexers/LexSpecman.cxx +constVariable:scintilla/lexers/LexStata.cxx +constVariable:scintilla/lexers/LexTACL.cxx +constVariable:scintilla/lexers/LexTADS3.cxx +constVariable:scintilla/lexers/LexTAL.cxx +constVariable:scintilla/lexers/LexTCL.cxx +constVariable:scintilla/lexers/LexTCMD.cxx +constVariable:scintilla/lexers/LexTeX.cxx +constVariable:scintilla/lexers/LexVB.cxx +constVariable:scintilla/lexers/LexVHDL.cxx // bp.itBracket not actually redundant as needed by return statements redundantAssignment:scintilla/lexers/LexCPP.cxx -// safety initializations at start of GetCharacterExtents -redundantAssignment:scintilla/gtk/ScintillaGTKAccessible.cxx - // Suppress everything in catch.hpp as won't be changing *:scintilla/test/unit/catch.hpp // For now, suppress all test source files as, since Catch 2, cppcheck shows many warnings showing diff --git a/src/scintilla/doc/ScintillaDoc.html b/src/scintilla/doc/ScintillaDoc.html index b96f6eea2..9e1af134e 100644 --- a/src/scintilla/doc/ScintillaDoc.html +++ b/src/scintilla/doc/ScintillaDoc.html @@ -119,7 +119,7 @@

Scintilla Documentation

-

Last edited 22 June 2019 NH

+

Last edited 3 January 2020 NH

There is an overview of the internal design of Scintilla.
@@ -131,6 +131,8 @@

Scintilla Documentation

Visual Basic.
Bait is a tiny sample using Scintilla on GTK.
+ ScintillaTest is a more complete + GTK sample which can be used to find bugs or prototype new features.
A detailed description of how to write a lexer, including a discussion of folding.
@@ -266,6 +268,34 @@

Introduction

+

Lexilla

+ +

For Scintilla 5.0, lexers will be split off into a separate Lexilla library. + Scintilla will be responsible for the GUI and calling lexers with Lexilla providing the lexers. + To allow work towards this with Scintilla 4.x, the first stage is to allow building Lexilla but + also include the lexers in Scintilla.

+ +

Lexilla is built as both a shared library and static library and applications may choose to + link to one or the other.

+ +

To build Lexilla, in the lexilla/src directory, run make (for gcc or clang)
+ make
+ or nmake for MSVC
+ nmake -f lexilla.mak
+

+ +

Lexilla follows the external lexer protocol + so can be loaded by applications that support this. + As the protocol only supports object lexers, an additional function CreateLexer(const char *name) + is exposed which will create a lexer object (ILexer5 *) for any object lexer or function lexer. +

+ +

A lexer created by Lexilla may be used in Scintilla by calling + SCI_SETILEXER.

+ +

Lexilla and its contained lexers can be tested with the TestLexers program in lexilla/test. + Read lexilla/test/README for information on building and using TestLexers.

+

Contents

@@ -711,10 +741,15 @@

Search and replace using the target

SCI_SEARCHINTARGET such as SCFIND_MATCHCASE, SCFIND_WHOLEWORD, SCFIND_WORDSTART, and SCFIND_REGEXP can be set with SCI_SETSEARCHFLAGS.

- SCI_SETTARGETSTART(position start)
+ + SCI_SETTARGETSTART(position start)
SCI_GETTARGETSTART → position
+ SCI_SETTARGETSTARTVIRTUALSPACE(position space)
+ SCI_GETTARGETSTARTVIRTUALSPACE → position
SCI_SETTARGETEND(position end)
SCI_GETTARGETEND → position
+ SCI_SETTARGETENDVIRTUALSPACE(position space)
+ SCI_GETTARGETENDVIRTUALSPACE → position
SCI_SETTARGETRANGE(position start, position end)
SCI_TARGETFROMSELECTION
SCI_TARGETWHOLEDOCUMENT
@@ -729,13 +764,22 @@

Search and replace using the target

SCI_SETTARGETSTART(position start)
SCI_GETTARGETSTART → position
+ SCI_SETTARGETSTARTVIRTUALSPACE(position space)
+ SCI_GETTARGETSTARTVIRTUALSPACE → position
SCI_SETTARGETEND(position end)
SCI_GETTARGETEND → position
+ SCI_SETTARGETENDVIRTUALSPACE(position space)
+ SCI_GETTARGETENDVIRTUALSPACE → position
SCI_SETTARGETRANGE(position start, position end)
These functions set and return the start and end of the target. When searching you can set start greater than end to find the last matching text in the - target rather than the first matching text. The target is also set by a successful + target rather than the first matching text. + Setting a target position with SCI_SETTARGETSTART, SCI_SETTARGETEND, or SCI_SETTARGETRANGE + sets the virtual space to 0. + The target is also set by a successful SCI_SEARCHINTARGET.

+

The virtual space of the target range can be set and retrieved with the corresponding ...VIRTUALSPACE + methods. This allows text to be inserted in virtual space more easily.

SCI_TARGETFROMSELECTION
Set the target start and end to the start and end positions of the selection.

@@ -1639,8 +1683,10 @@

Multiple Selection and Virtual SpaceSCI_GETSELECTIONNANCHORVIRTUALSPACE(int selection) → position
SCI_SETSELECTIONNSTART(int selection, position anchor)
SCI_GETSELECTIONNSTART(int selection) → position
+ SCI_GETSELECTIONNSTARTVIRTUALSPACE(int selection) → position
SCI_SETSELECTIONNEND(int selection, position caret)
SCI_GETSELECTIONNEND(int selection) → position
+ SCI_GETSELECTIONNENDVIRTUALSPACE(int selection) → position

SCI_SETRECTANGULARSELECTIONCARET(position caret)
@@ -1790,9 +1836,12 @@

Multiple Selection and Virtual Space SCI_SETSELECTIONNSTART(int selection, position anchor)
SCI_GETSELECTIONNSTART(int selection) → position
+ SCI_GETSELECTIONNSTARTVIRTUALSPACE(int selection) → position
SCI_SETSELECTIONNEND(int selection, position caret)
SCI_GETSELECTIONNEND(int selection) → position
+ SCI_GETSELECTIONNENDVIRTUALSPACE(int selection) → position
Set or query the start and end position of each already existing selection. + Query the virtual space at start and end of each selection. Mostly of use to query each range for its text. The selection parameter is zero-based.

@@ -2292,6 +2341,7 @@

White space

SCI_GETWHITESPACESIZE → int
SCI_SETWHITESPACESIZE sets the size of the dots used for mark space characters. The SCI_GETWHITESPACESIZE message retrieves the current size. + The value 0 is valid and makes the dots invisible.

SCI_SETTABDRAWMODE(int tabDrawMode)
@@ -3912,8 +3962,11 @@

Tabs and Indentation Guides

inserting a tab at the current character position and backspace unindents the line rather than deleting a character. Scintilla can also display indentation guides (vertical lines) to help you to generate code.

- SCI_SETTABWIDTH(int tabWidth)
+ + SCI_SETTABWIDTH(int tabWidth)
SCI_GETTABWIDTH → int
+ SCI_SETTABMINIMUMWIDTH(int pixels)
+ SCI_GETTABMINIMUMWIDTH → int
SCI_CLEARTABSTOPS(line line)
SCI_ADDTABSTOP(line line, int x)
SCI_GETNEXTTABSTOP(line line, int x) → int
@@ -3936,6 +3989,15 @@

Tabs and Indentation Guides

SCI_GETHIGHLIGHTGUIDE → position
+

SCI_SETTABMINIMUMWIDTH(int pixels)
+ SCI_GETTABMINIMUMWIDTH → int
+ SCI_SETTABMINIMUMWIDTH sets the minimum size of a tab in pixels to ensure that the tab + can be seen. The default value is 2. This is particularly useful with proportional fonts with fractional widths where + the character before the tab may end a fraction of a pixel before a tab stop, causing the tab to only be a fraction of + a pixel wide without this setting. + Where displaying a miniaturized version of the document, setting this to 0 may make the miniaturized + version lay out more like the normal size version.

+

SCI_SETTABWIDTH(int tabWidth)
SCI_GETTABWIDTH → int
SCI_SETTABWIDTH sets the size of a tab as a multiple of the size of a space @@ -5489,6 +5551,12 @@

Key bindings

If you are building a table, you might want to use SCMOD_NORM, which has the value 0, to mean no modifiers.

+

On Win32, the numeric keypad with Alt pressed can be used to enter characters by number. + This can produce unexpected results in non-numlock mode when function keys are assigned so + potentially problematic keys are ignored. For example, setting + SCMOD_ALT,SCK_UP will only be active for the Up key on the + main cursor keys, not the numeric keypad.

+

SCI_ASSIGNCMDKEY(int keyDefinition, int sciCommand)
This assigns the given key definition to a Scintilla command identified by @@ -6825,14 +6893,19 @@

Lexer

styling and fold points for an unsupported language you can either do this in the container or better still, write your own lexer following the pattern of one of the existing ones.

-

Scintilla also supports external lexers. These are DLLs (on Windows) or .so modules (on GTK/Linux) that export three +

If the symbol SCI_EMPTYCATALOGUE is defined when building + Scintilla, then no lexers are made available but other lexing support code may be present.

+ +

Scintilla also supports external lexers. These are DLLs (on Windows), .dylib modules (on macOS), + or .so modules (on GTK/Linux) that export three functions: GetLexerCount, GetLexerName, and - GetLexerFactory. See externalLexer.cxx for more.

+ GetLexerFactory. See ExternalLexer.cxx for more information.

SCI_SETLEXER(int lexer)
SCI_GETLEXER → int
SCI_SETLEXERLANGUAGE(<unused>, const char *language)
SCI_GETLEXERLANGUAGE(<unused>, char *language) → int
+ SCI_SETILEXER(<unused>, pointer lexer)
SCI_LOADLEXERLIBRARY(<unused>, const char *path)
SCI_COLOURISE(position start, position end)
@@ -6883,6 +6956,10 @@

Lexer

Lex*.cxx file and search for LexerModule. The third argument in the LexerModule constructor is the name to use.

+

SCI_SETILEXER(<unused>, pointer lexer)
+ SCI_SETILEXER allows setting a lexer as an ILexer5*. + The lexer may be implemented by an application or a shared library such as Lexilla.

+

To test if your lexer assignment worked, use SCI_GETLEXER before and after setting the new lexer to see if the lexer number changed.

@@ -6890,7 +6967,7 @@

Lexer

SCI_GETLEXERLANGUAGE retrieves the name of the lexer.

SCI_LOADLEXERLIBRARY(<unused>, const char *path)
- Load a lexer implemented in a shared library. This is a .so file on GTK/Linux or a .DLL file on Windows. + Load a lexer implemented in a shared library. This is a .so file on GTK/Linux, a .dylib file on macOS, or a .DLL file on Windows.

SCI_COLOURISE(position start, position end)
@@ -7065,6 +7142,8 @@

Lexer Objects

can be used during lexing. For example a C++ lexer may store a set of preprocessor definitions or variable declarations and style these depending on their role.

+

ILexer4 is extended with the provisional ILexer5 interface to support use of Lexilla.

+

A set of helper classes allows older lexers defined by functions to be used in Scintilla.

ILexer4

@@ -7099,6 +7178,18 @@

ILexer4

};
+

ILexer5

+ +
+class ILexer5 : public ILexer4 {
+public:
+        virtual const char * SCI_METHOD GetName() = 0;
+        virtual int SCI_METHOD  GetIdentifier() = 0;
+        virtual const char * SCI_METHOD PropertyGet(const char *key) = 0;
+};
+
+
+

The types Sci_Position and Sci_PositionU are used for positions and line numbers in the document. With Scintilla 4, 64-bit builds define these as 64-bit types to allow future implementation of documents larger than 2 GB. @@ -7146,6 +7237,15 @@

ILexer4

DescriptionOfStyle is an English description of the style like "Function or method name definition".

+

GetName and GetIdentifier may be called +to discover the identity of a lexer and be used to implement +SCI_GETLEXERLANGUAGE and +SCI_GETLEXER.

+ +

PropertyGet may be called +to discover the value of a property stored by a lexer and be used to implement +SCI_GETPROPERTY.

+

IDocument

diff --git a/src/scintilla/doc/ScintillaDownload.html b/src/scintilla/doc/ScintillaDownload.html index eea2aea62..2756014b6 100644 --- a/src/scintilla/doc/ScintillaDownload.html +++ b/src/scintilla/doc/ScintillaDownload.html @@ -26,9 +26,9 @@
@@ -42,7 +42,7 @@

containing very few restrictions.

- Release 4.2.0 + Release 4.3.2

Source Code @@ -50,8 +50,8 @@

The source code package contains all of the source code for Scintilla but no binary executable code and is available in
    -
  • zip format (1.7M) commonly used on Windows
  • -
  • tgz format (1.4M) commonly used on Linux and compatible operating systems
  • +
  • zip format (1.7M) commonly used on Windows
  • +
  • tgz format (1.4M) commonly used on Linux and compatible operating systems
Instructions for building on both Windows and Linux are included in the readme file.

diff --git a/src/scintilla/doc/ScintillaHistory.html b/src/scintilla/doc/ScintillaHistory.html index 0c98f2310..e2652f53f 100644 --- a/src/scintilla/doc/ScintillaHistory.html +++ b/src/scintilla/doc/ScintillaHistory.html @@ -111,8 +111,6 @@

- - @@ -534,17 +532,25 @@

+ - + - + + + + + + + +
- + Windows   - + GTK/Linux   Willy Devaux David Clain Brendon Yenson
Philipp
Vamsi Potluru Praveen AmbekarHenrik Hank Luke Rasmussen
Philipp maboroshin Gokul Krishnan John Horiganjj5
jj5 Jad Altahan Andrea Ricchi Juarez RudsatzWil van Antwerpen
Wil van Antwerpen Hodong KimMichael ConradDejan Budimir
Andreas FalkenhahnMark ReayDavid ShumanMcLoo

@@ -556,6 +562,221 @@

Icons Copyright(C) 1998 by Dean S. Jones
+

+ Release 4.3.2 +

+
    +
  • + Released 6 March 2020. +
  • +
  • + On Win32 fix new bug that treated all dropped text as rectangular. +
  • +
+

+ Release 4.3.1 +

+
    +
  • + Released 4 March 2020. +
  • +
  • + Add default argument for StyleContext::GetRelative. + Feature #1336. +
  • +
  • + Fix drag and drop between different encodings on Win32 by always providing CF_UNICODETEXT only. + Bug #2151. +
  • +
  • + Automatically scroll while dragging text. + Feature #497. +
  • +
  • + On Win32, the numeric keypad with Alt pressed can be used to enter characters by number. + This can produce unexpected results in non-numlock mode when function keys are assigned. + Potentially problematic keys like Alt+KeypadUp are now ignored. + Bug #2152. +
  • +
  • + Crash fixed with Direct2D on Win32 when updating driver. + Bug #2138. +
  • +
  • + For SciTE on Win32, fix crashes when Lua script closes application. + Bug #2155. +
  • +
+

+ Release 4.3.0 +

+
    +
  • + Released 16 January 2020. +
  • +
  • + Lexers made available as Lexilla library. + TestLexers program with tests for Lexilla and lexers added in lexilla/test. +
  • +
  • + SCI_SETILEXER implemented to use lexers from Lexilla or other sources. +
  • +
  • + ILexer5 interface defined provisionally to support use of Lexilla. + The details of this interface may change before being stabilised in Scintilla 5.0. +
  • +
  • + SCI_LOADLEXERLIBRARY implemented on Cocoa. +
  • +
  • + Build Scintilla with SCI_EMPTYCATALOGUE to avoid making lexers available. +
  • +
  • + Lexer and folder added for Raku language. + Feature #1328. +
  • +
  • + Don't clear clipboard before copying text with Qt. + Bug #2147. +
  • +
  • + On Win32, remove support for CF_TEXT clipboard format as Windows will convert to + CF_UNICODETEXT. +
  • +
  • + Improve IME behaviour on GTK. + Set candidate position for windowed IME. + Improve location of candidate window. + Prevent movement of candidate window while typing. + Bug #2135. +
  • +
+

+ Release 4.2.3 +

+
    +
  • + Released 11 December 2019. +
  • +
  • + Fix failure in SciTE's Complete Symbol command. +
  • +
+

+ Release 4.2.2 +

+
    +
  • + Released 7 December 2019. +
  • +
  • + Move rather than grow selection when insertion at start. + Bug #2140. +
  • +
  • + Allow target to have virtual space. + Add methods for finding the virtual space at start and end of multiple selections. + Feature #1316. +
  • +
  • + SciTE on Win32 adds mouse button "Forward" and "Backward" key definitions for use in + properties like user.shortcuts. + Feature #1317. +
  • +
  • + Lexer and folder added for Hollywood language. + Feature #1324. +
  • +
  • + HTML lexer treats custom tags from HTML5 as known tags. These contain "-" like "custom-tag". + Feature #1299. +
  • +
  • + HTML lexer fixes bug with some non-alphabetic characters in unknown tags. + Feature #1320. +
  • +
  • + Fix bug in properties file lexer where long lines were only styled for the first 1024 characters. + Bug #1933. +
  • +
  • + Ruby lexer recognizes squiggly heredocs. + Feature #1326. +
  • +
  • + Avoid unnecessary IME caret movement on Win32. + Feature #1304. +
  • +
  • + Clear IME state when switching language on Win32. + Bug #2137. +
  • +
  • + Fixed drawing of translucent rounded rectangles on Win32 with Direct2D. + Bug #2144. +
  • +
  • + Setting rectangular selection made faster. + Bug #2130. +
  • +
  • + SciTE reassigns *.s extension to the GNU Assembler language from the S+ statistical language. +
  • +
+

+ Release 4.2.1 +

+
    +
  • + Released 24 October 2019. +
  • +
  • + Add SCI_SETTABMINIMUMWIDTH to set the minimum width of tabs. + This allows minimaps or overviews to be layed out to match the full size editing view. + Bug #2118. +
  • +
  • + SciTE enables use of SCI_ commands in user.context.menu. +
  • +
  • + XML folder adds fold.xml.at.tag.open option to fold tags at the start of the tag "<" instead of the end ">". + Bug #2128. +
  • +
  • + Metapost lexer fixes crash with 'interface=none' comment. + Bug #2129. +
  • +
  • + Perl lexer supports indented here-docs. + Bug #2121. +
  • +
  • + Perl folder folds qw arrays. + Feature #1306. +
  • +
  • + TCL folder can turn off whitespace flag by setting fold.compact property to 0. + Bug #2131. +
  • +
  • + Optimize setting up keyword lists in lexers. + Feature #1305. +
  • +
  • + Updated case conversion and character categories to Unicode 12.1. + Feature #1315. +
  • +
  • + On Win32, stop the IME candidate window moving unnecessarily and position it better.
    + Stop candidate window overlapping composition text and taskbar.
    + Position candidate window closer to composition text.
    + Stop candidate window moving while typing.
    + Align candidate window to target part of composition text.
    + Stop Google IME on Windows 7 moving while typing.
    + Bug #2120. + Feature #1300. +
  • +

Release 4.2.0

diff --git a/src/scintilla/doc/ScintillaToDo.html b/src/scintilla/doc/ScintillaToDo.html index c1ca57611..4aa931812 100644 --- a/src/scintilla/doc/ScintillaToDo.html +++ b/src/scintilla/doc/ScintillaToDo.html @@ -7,6 +7,20 @@ + Scintilla and SciTE To Do @@ -23,6 +37,10 @@ +

Bugs and To Do List

@@ -33,12 +51,6 @@

Issues can be reported on the Bug Tracker and features requested on the Feature Request Tracker.

-

- Scintilla Bugs -

-

- Automatic scrolling when text dragged near edge of window. -

Scintilla To Do

diff --git a/src/scintilla/doc/index.html b/src/scintilla/doc/index.html index 942032c54..1763e3eb8 100644 --- a/src/scintilla/doc/index.html +++ b/src/scintilla/doc/index.html @@ -9,7 +9,7 @@ - +