mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
deps: Upgrade Scintilla 5.5.8, Lexilla 5.4.6
- Updated Scintilla from 5.5.7 to 5.5.8 - Updated Lexilla from 5.4.5 to 5.4.6 - Preserved NP3 customizations (oniguruma regex, lexers_x, Scintilla.h patches) - Documented all Scintilla.h NP3 patches in research doc - Added _upgrade_backup to .gitignore - Updated Changes.txt with upgrade entry
This commit is contained in:
parent
a22138d5ed
commit
2e4889e82a
2
.gitignore
vendored
2
.gitignore
vendored
@ -34,6 +34,8 @@ Thumbs.db
|
||||
/Build/Resources
|
||||
/Build/Packages
|
||||
|
||||
/_upgrade_backup
|
||||
|
||||
/packages
|
||||
/other_sln/packages
|
||||
|
||||
|
||||
@ -48,6 +48,7 @@ NEW:
|
||||
--------------------------------------------------------
|
||||
CHANGES:
|
||||
--------------------------------------------------------
|
||||
[.117.2]- Update to Scintilla 5.5.8 and Lexilla 5.4.6 (SCI/LEX).
|
||||
[.117.2]- Moved installer scripts to Build\Installer folder with local language files (SUP).
|
||||
[.101.1]- Rizonesoft Copyright © 2008-2025 to year "2008-2026".
|
||||
[1114.1]- Remove the "Opera Promotion" page in Notepad3 "INNO Setup Installer" (SUP).
|
||||
|
||||
@ -149,6 +149,7 @@ val SCLEX_TROFF=137
|
||||
val SCLEX_DART=138
|
||||
val SCLEX_ZIG=139
|
||||
val SCLEX_NIX=140
|
||||
val SCLEX_SINEX=141
|
||||
|
||||
# When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
|
||||
# value assigned in sequence from SCLEX_AUTOMATIC+1.
|
||||
@ -1769,7 +1770,6 @@ val SCE_MARKDOWN_LINK=18
|
||||
val SCE_MARKDOWN_CODE=19
|
||||
val SCE_MARKDOWN_CODE2=20
|
||||
val SCE_MARKDOWN_CODEBK=21
|
||||
val SCE_MARKDOWN_HDRTEXT=22
|
||||
# Lexical state for SCLEX_TXT2TAGS
|
||||
lex Txt2tags=SCLEX_TXT2TAGS SCE_TXT2TAGS_
|
||||
val SCE_TXT2TAGS_DEFAULT=0
|
||||
@ -2451,3 +2451,11 @@ val SCE_NIX_KEYWORD2=13
|
||||
val SCE_NIX_KEYWORD3=14
|
||||
val SCE_NIX_KEYWORD4=15
|
||||
val SCE_NIX_STRINGEOL=16
|
||||
# Lexical states for SCLEX_SINEX
|
||||
lex Sinex=SCLEX_SINEX SCE_SINEX_
|
||||
val SCE_SINEX_DEFAULT=0
|
||||
val SCE_SINEX_COMMENTLINE=1
|
||||
val SCE_SINEX_BLOCK_START=2
|
||||
val SCE_SINEX_BLOCK_END=3
|
||||
val SCE_SINEX_DATE=4
|
||||
val SCE_SINEX_NUMBER=5
|
||||
|
||||
@ -1,19 +1,20 @@
|
||||
/* Scintilla source code edit control */
|
||||
/** @file SciLexer.h
|
||||
** Interface to the added lexer functions in the SciLexer version of the edit control.
|
||||
** Interface to the lexer functions in Lexilla.
|
||||
** File called SciLexer.h ro retain compatibility with client code.
|
||||
**/
|
||||
/* Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>
|
||||
* The License.txt file describes the conditions under which this software may be distributed. */
|
||||
|
||||
/* Most of this file is automatically generated from the Scintilla.iface interface definition
|
||||
* file which contains any comments about the definitions. HFacer.py does the generation. */
|
||||
/* Most of this file is automatically generated from the LexicalStyles.iface interface definition
|
||||
* file. LexFacer.py does the generation. */
|
||||
|
||||
#ifndef SCILEXER_H
|
||||
#define SCILEXER_H
|
||||
|
||||
/* SciLexer features - not in standard Scintilla */
|
||||
/* Lexilla features */
|
||||
|
||||
/* ++Autogenerated -- start of section automatically generated from Scintilla.iface */
|
||||
/* ++Autogenerated -- start of section automatically generated from LexicalStyles.iface */
|
||||
#define SCLEX_CONTAINER 0
|
||||
#define SCLEX_NULL 1
|
||||
#define SCLEX_PYTHON 2
|
||||
@ -153,6 +154,7 @@
|
||||
#define SCLEX_DART 138
|
||||
#define SCLEX_ZIG 139
|
||||
#define SCLEX_NIX 140
|
||||
#define SCLEX_SINEX 141
|
||||
#define SCLEX_AUTOMATIC 1000
|
||||
#define SCE_P_DEFAULT 0
|
||||
#define SCE_P_COMMENTLINE 1
|
||||
@ -1578,7 +1580,6 @@
|
||||
#define SCE_MARKDOWN_CODE 19
|
||||
#define SCE_MARKDOWN_CODE2 20
|
||||
#define SCE_MARKDOWN_CODEBK 21
|
||||
#define SCE_MARKDOWN_HDRTEXT 22
|
||||
#define SCE_TXT2TAGS_DEFAULT 0
|
||||
#define SCE_TXT2TAGS_LINE_BEGIN 1
|
||||
#define SCE_TXT2TAGS_STRONG1 2
|
||||
@ -2189,6 +2190,12 @@
|
||||
#define SCE_NIX_KEYWORD3 14
|
||||
#define SCE_NIX_KEYWORD4 15
|
||||
#define SCE_NIX_STRINGEOL 16
|
||||
/* --Autogenerated -- end of section automatically generated from Scintilla.iface */
|
||||
#define SCE_SINEX_DEFAULT 0
|
||||
#define SCE_SINEX_COMMENTLINE 1
|
||||
#define SCE_SINEX_BLOCK_START 2
|
||||
#define SCE_SINEX_BLOCK_END 3
|
||||
#define SCE_SINEX_DATE 4
|
||||
#define SCE_SINEX_NUMBER 5
|
||||
/* --Autogenerated -- end of section automatically generated from LexicalStyles.iface */
|
||||
|
||||
#endif
|
||||
|
||||
@ -20,7 +20,7 @@ namespace {
|
||||
|
||||
const int catRanges[] = {
|
||||
//++Autogenerated -- start of section automatically generated
|
||||
// Created with Python 3.13.0, Unicode 15.1.0
|
||||
// Created with Python 3.14.0, Unicode 16.0.0
|
||||
25,
|
||||
1046,
|
||||
1073,
|
||||
@ -754,7 +754,7 @@ const int catRanges[] = {
|
||||
70141,
|
||||
70170,
|
||||
70237,
|
||||
70405,
|
||||
70373,
|
||||
70660,
|
||||
71971,
|
||||
72005,
|
||||
@ -1425,13 +1425,13 @@ const int catRanges[] = {
|
||||
223334,
|
||||
223396,
|
||||
223677,
|
||||
223697,
|
||||
223752,
|
||||
224081,
|
||||
224309,
|
||||
224613,
|
||||
224917,
|
||||
225201,
|
||||
225277,
|
||||
225285,
|
||||
225350,
|
||||
225380,
|
||||
@ -1469,7 +1469,9 @@ const int catRanges[] = {
|
||||
233219,
|
||||
233425,
|
||||
233473,
|
||||
233789,
|
||||
233760,
|
||||
233793,
|
||||
233853,
|
||||
233984,
|
||||
235389,
|
||||
235424,
|
||||
@ -1948,7 +1950,7 @@ const int catRanges[] = {
|
||||
292501,
|
||||
293778,
|
||||
293973,
|
||||
296189,
|
||||
296285,
|
||||
296981,
|
||||
297341,
|
||||
297994,
|
||||
@ -2317,7 +2319,7 @@ const int catRanges[] = {
|
||||
406229,
|
||||
406532,
|
||||
407573,
|
||||
408733,
|
||||
408797,
|
||||
409077,
|
||||
409092,
|
||||
409621,
|
||||
@ -2586,7 +2588,9 @@ const int catRanges[] = {
|
||||
1374465,
|
||||
1374496,
|
||||
1374529,
|
||||
1374589,
|
||||
1374560,
|
||||
1374625,
|
||||
1374685,
|
||||
1374720,
|
||||
1374753,
|
||||
1374813,
|
||||
@ -2597,7 +2601,10 @@ const int catRanges[] = {
|
||||
1374945,
|
||||
1374976,
|
||||
1375009,
|
||||
1375069,
|
||||
1375040,
|
||||
1375073,
|
||||
1375104,
|
||||
1375165,
|
||||
1375811,
|
||||
1375904,
|
||||
1375937,
|
||||
@ -3003,6 +3010,8 @@ const int catRanges[] = {
|
||||
2144093,
|
||||
2144097,
|
||||
2144189,
|
||||
2144260,
|
||||
2145949,
|
||||
2146308,
|
||||
2156285,
|
||||
2156548,
|
||||
@ -3116,6 +3125,19 @@ const int catRanges[] = {
|
||||
2204957,
|
||||
2205192,
|
||||
2205533,
|
||||
2205704,
|
||||
2206020,
|
||||
2206147,
|
||||
2206180,
|
||||
2206208,
|
||||
2206941,
|
||||
2207013,
|
||||
2207180,
|
||||
2207203,
|
||||
2207233,
|
||||
2207965,
|
||||
2208210,
|
||||
2208285,
|
||||
2214922,
|
||||
2215933,
|
||||
2215940,
|
||||
@ -3125,7 +3147,9 @@ const int catRanges[] = {
|
||||
2217437,
|
||||
2217476,
|
||||
2217565,
|
||||
2219941,
|
||||
2218052,
|
||||
2218173,
|
||||
2219909,
|
||||
2220036,
|
||||
2220970,
|
||||
2221284,
|
||||
@ -3281,6 +3305,37 @@ const int catRanges[] = {
|
||||
2256317,
|
||||
2256389,
|
||||
2256573,
|
||||
2256900,
|
||||
2257245,
|
||||
2257252,
|
||||
2257309,
|
||||
2257348,
|
||||
2257405,
|
||||
2257412,
|
||||
2258653,
|
||||
2258660,
|
||||
2258694,
|
||||
2258789,
|
||||
2259005,
|
||||
2259014,
|
||||
2259069,
|
||||
2259110,
|
||||
2259165,
|
||||
2259174,
|
||||
2259325,
|
||||
2259334,
|
||||
2259397,
|
||||
2259430,
|
||||
2259461,
|
||||
2259492,
|
||||
2259525,
|
||||
2259556,
|
||||
2259601,
|
||||
2259677,
|
||||
2259697,
|
||||
2259773,
|
||||
2260005,
|
||||
2260093,
|
||||
2260996,
|
||||
2262694,
|
||||
2262789,
|
||||
@ -3351,9 +3406,13 @@ const int catRanges[] = {
|
||||
2283357,
|
||||
2283528,
|
||||
2283869,
|
||||
2284040,
|
||||
2284701,
|
||||
2285572,
|
||||
2286461,
|
||||
2286501,
|
||||
2286534,
|
||||
2286565,
|
||||
2286598,
|
||||
2286661,
|
||||
2286790,
|
||||
@ -3442,6 +3501,11 @@ const int catRanges[] = {
|
||||
2318141,
|
||||
2318353,
|
||||
2318685,
|
||||
2324484,
|
||||
2325553,
|
||||
2325597,
|
||||
2326024,
|
||||
2326365,
|
||||
2326532,
|
||||
2326845,
|
||||
2326852,
|
||||
@ -3523,7 +3587,8 @@ const int catRanges[] = {
|
||||
2353221,
|
||||
2353265,
|
||||
2353672,
|
||||
2354013,
|
||||
2353989,
|
||||
2354045,
|
||||
2356740,
|
||||
2356797,
|
||||
2357258,
|
||||
@ -3549,8 +3614,16 @@ const int catRanges[] = {
|
||||
2525220,
|
||||
2525413,
|
||||
2525917,
|
||||
2526212,
|
||||
2654077,
|
||||
2654212,
|
||||
2672893,
|
||||
2891780,
|
||||
2892741,
|
||||
2893126,
|
||||
2893221,
|
||||
2893320,
|
||||
2893661,
|
||||
2949124,
|
||||
2967357,
|
||||
2967556,
|
||||
@ -3583,6 +3656,12 @@ const int catRanges[] = {
|
||||
2977565,
|
||||
2977700,
|
||||
2978333,
|
||||
2992131,
|
||||
2992228,
|
||||
2993507,
|
||||
2993585,
|
||||
2993672,
|
||||
2994013,
|
||||
3000320,
|
||||
3001345,
|
||||
3002378,
|
||||
@ -3608,7 +3687,7 @@ const int catRanges[] = {
|
||||
3211037,
|
||||
3211268,
|
||||
3250909,
|
||||
3252228,
|
||||
3252196,
|
||||
3252541,
|
||||
3538435,
|
||||
3538589,
|
||||
@ -3641,6 +3720,11 @@ const int catRanges[] = {
|
||||
3642353,
|
||||
3642394,
|
||||
3642525,
|
||||
3768341,
|
||||
3776008,
|
||||
3776349,
|
||||
3776533,
|
||||
3790493,
|
||||
3792901,
|
||||
3794397,
|
||||
3794437,
|
||||
@ -3825,6 +3909,13 @@ const int catRanges[] = {
|
||||
3972485,
|
||||
3972616,
|
||||
3972957,
|
||||
3979780,
|
||||
3980741,
|
||||
3980804,
|
||||
3980840,
|
||||
3981181,
|
||||
3981297,
|
||||
3981341,
|
||||
3996676,
|
||||
3996925,
|
||||
3996932,
|
||||
@ -3977,7 +4068,9 @@ const int catRanges[] = {
|
||||
4133397,
|
||||
4134365,
|
||||
4134421,
|
||||
4134493,
|
||||
4134813,
|
||||
4134933,
|
||||
4135005,
|
||||
4136981,
|
||||
4147869,
|
||||
4148245,
|
||||
@ -3985,21 +4078,18 @@ const int catRanges[] = {
|
||||
4148757,
|
||||
4149181,
|
||||
4149269,
|
||||
4149565,
|
||||
4149781,
|
||||
4151261,
|
||||
4151285,
|
||||
4151517,
|
||||
4149597,
|
||||
4149749,
|
||||
4151549,
|
||||
4151765,
|
||||
4152221,
|
||||
4152341,
|
||||
4152637,
|
||||
4152253,
|
||||
4152309,
|
||||
4152669,
|
||||
4152853,
|
||||
4153149,
|
||||
4153365,
|
||||
4158077,
|
||||
4158101,
|
||||
4159869,
|
||||
4161032,
|
||||
4161373,
|
||||
4194308,
|
||||
|
||||
@ -187,24 +187,6 @@ public:
|
||||
void GetCurrentLowered(char *s, Sci_PositionU len) const;
|
||||
enum class Transform { none, lower };
|
||||
void GetCurrentString(std::string &string, Transform transform) const;
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
|
||||
bool Match(char ch0, char ch1, char ch2) const noexcept {
|
||||
return Match(ch0, ch1) && ch2 == styler.SafeGetCharAt(currentPos + 2, '\0');
|
||||
}
|
||||
|
||||
bool MatchNext() const noexcept {
|
||||
return ch == chNext && ch == static_cast<unsigned char>(styler[currentPos + 2]);
|
||||
}
|
||||
bool MatchNext(char ch0, char ch1) const noexcept {
|
||||
return chNext == static_cast<unsigned char>(ch0) && ch1 == styler.SafeGetCharAt(currentPos + 2, '\0');
|
||||
}
|
||||
bool MatchNext(char ch0, char ch1, char ch2) const noexcept {
|
||||
return MatchNext(ch0, ch1) && ch2 == styler.SafeGetCharAt(currentPos + 3, '\0');
|
||||
}
|
||||
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -18,13 +18,11 @@ def Generate():
|
||||
sources = [
|
||||
os.path.join(lexilla, "src", "Lexilla.cxx"),
|
||||
os.path.join(lexilla, "lexlib", "*.cxx"),
|
||||
os.path.join(lexilla, "lexers", "*.cxx"),
|
||||
os.path.join(lexilla, "lexers_x", "*.cxx")]
|
||||
os.path.join(lexilla, "lexers", "*.cxx")]
|
||||
includes = [
|
||||
os.path.join(lexilla, "include"),
|
||||
os.path.join(scintilla, "include"),
|
||||
os.path.join(lexilla, "lexlib"),
|
||||
os.path.join(lexilla, "lexers_x")]
|
||||
os.path.join(lexilla, "lexlib")]
|
||||
|
||||
# Create the dependencies file for g++
|
||||
deps = Dependencies.FindDependencies(sources, includes, ".o", "../lexilla/")
|
||||
|
||||
@ -28,60 +28,144 @@ using namespace Lexilla;
|
||||
|
||||
//++Autogenerated -- run lexilla/scripts/LexillaGen.py to regenerate
|
||||
//**\(extern const LexerModule \*;\n\)
|
||||
extern const LexerModule lmAHK;
|
||||
extern const LexerModule lmA68k;
|
||||
extern const LexerModule lmAbaqus;
|
||||
extern const LexerModule lmAda;
|
||||
extern const LexerModule lmAPDL;
|
||||
extern const LexerModule lmAs;
|
||||
extern const LexerModule lmAsciidoc;
|
||||
extern const LexerModule lmAsm;
|
||||
extern const LexerModule lmAsn1;
|
||||
extern const LexerModule lmASY;
|
||||
extern const LexerModule lmAU3;
|
||||
extern const LexerModule lmAVE;
|
||||
extern const LexerModule lmAVS;
|
||||
extern const LexerModule lmBaan;
|
||||
extern const LexerModule lmBash;
|
||||
extern const LexerModule lmBatch;
|
||||
extern const LexerModule lmBibTeX;
|
||||
extern const LexerModule lmBlitzBasic;
|
||||
extern const LexerModule lmBullant;
|
||||
extern const LexerModule lmCaml;
|
||||
extern const LexerModule lmCIL;
|
||||
extern const LexerModule lmClw;
|
||||
extern const LexerModule lmClwNoCase;
|
||||
extern const LexerModule lmCmake;
|
||||
extern const LexerModule lmCOBOL;
|
||||
extern const LexerModule lmCoffeeScript;
|
||||
extern const LexerModule lmConf;
|
||||
extern const LexerModule lmCPP;
|
||||
extern const LexerModule lmCPPNoCase;
|
||||
extern const LexerModule lmCsound;
|
||||
extern const LexerModule lmCss;
|
||||
extern const LexerModule lmCSV;
|
||||
extern const LexerModule lmD;
|
||||
extern const LexerModule lmDart;
|
||||
extern const LexerModule lmDataflex;
|
||||
extern const LexerModule lmDiff;
|
||||
extern const LexerModule lmDMAP;
|
||||
extern const LexerModule lmDMIS;
|
||||
extern const LexerModule lmECL;
|
||||
extern const LexerModule lmEDIFACT;
|
||||
extern const LexerModule lmEiffel;
|
||||
extern const LexerModule lmEiffelkw;
|
||||
extern const LexerModule lmErlang;
|
||||
extern const LexerModule lmErrorList;
|
||||
extern const LexerModule lmESCRIPT;
|
||||
extern const LexerModule lmF77;
|
||||
extern const LexerModule lmFlagShip;
|
||||
extern const LexerModule lmForth;
|
||||
extern const LexerModule lmFortran;
|
||||
extern const LexerModule lmFreeBasic;
|
||||
extern const LexerModule lmFSharp;
|
||||
extern const LexerModule lmGAP;
|
||||
extern const LexerModule lmGDScript;
|
||||
extern const LexerModule lmGui4Cli;
|
||||
extern const LexerModule lmHaskell;
|
||||
extern const LexerModule lmHollywood;
|
||||
extern const LexerModule lmHTML;
|
||||
extern const LexerModule lmIHex;
|
||||
extern const LexerModule lmIndent;
|
||||
extern const LexerModule lmInno;
|
||||
extern const LexerModule lmJSON;
|
||||
extern const LexerModule lmJulia;
|
||||
extern const LexerModule lmKix;
|
||||
extern const LexerModule lmKotlin;
|
||||
extern const LexerModule lmKVIrc;
|
||||
extern const LexerModule lmLatex;
|
||||
extern const LexerModule lmLISP;
|
||||
extern const LexerModule lmLiterateHaskell;
|
||||
extern const LexerModule lmLot;
|
||||
extern const LexerModule lmLout;
|
||||
extern const LexerModule lmLua;
|
||||
extern const LexerModule lmMagikSF;
|
||||
extern const LexerModule lmMake;
|
||||
extern const LexerModule lmMarkdown;
|
||||
extern const LexerModule lmMatlab;
|
||||
extern const LexerModule lmMaxima;
|
||||
extern const LexerModule lmMETAPOST;
|
||||
extern const LexerModule lmMMIXAL;
|
||||
extern const LexerModule lmModula;
|
||||
extern const LexerModule lmMSSQL;
|
||||
extern const LexerModule lmMySQL;
|
||||
extern const LexerModule lmNim;
|
||||
extern const LexerModule lmNimrod;
|
||||
extern const LexerModule lmNix;
|
||||
extern const LexerModule lmNncrontab;
|
||||
extern const LexerModule lmNsis;
|
||||
extern const LexerModule lmNull;
|
||||
extern const LexerModule lmOctave;
|
||||
extern const LexerModule lmOpal;
|
||||
extern const LexerModule lmOScript;
|
||||
extern const LexerModule lmPascal;
|
||||
extern const LexerModule lmPB;
|
||||
extern const LexerModule lmPerl;
|
||||
extern const LexerModule lmPHPSCRIPT;
|
||||
extern const LexerModule lmPLM;
|
||||
extern const LexerModule lmPO;
|
||||
extern const LexerModule lmPOV;
|
||||
extern const LexerModule lmPowerPro;
|
||||
extern const LexerModule lmPowerShell;
|
||||
extern const LexerModule lmProgress;
|
||||
extern const LexerModule lmProps;
|
||||
extern const LexerModule lmPS;
|
||||
extern const LexerModule lmPureBasic;
|
||||
extern const LexerModule lmPython;
|
||||
extern const LexerModule lmR;
|
||||
extern const LexerModule lmRaku;
|
||||
extern const LexerModule lmREBOL;
|
||||
extern const LexerModule lmRegistry;
|
||||
extern const LexerModule lmRuby;
|
||||
extern const LexerModule lmRust;
|
||||
extern const LexerModule lmSAS;
|
||||
extern const LexerModule lmScriptol;
|
||||
extern const LexerModule lmSINEX;
|
||||
extern const LexerModule lmSmalltalk;
|
||||
extern const LexerModule lmSML;
|
||||
extern const LexerModule lmSorc;
|
||||
extern const LexerModule lmSpecman;
|
||||
extern const LexerModule lmSpice;
|
||||
extern const LexerModule lmSQL;
|
||||
extern const LexerModule lmSysVerilog;
|
||||
extern const LexerModule lmSrec;
|
||||
extern const LexerModule lmStata;
|
||||
extern const LexerModule lmSTTXT;
|
||||
extern const LexerModule lmTACL;
|
||||
extern const LexerModule lmTADS3;
|
||||
extern const LexerModule lmTAL;
|
||||
extern const LexerModule lmTCL;
|
||||
extern const LexerModule lmTCMD;
|
||||
extern const LexerModule lmTEHex;
|
||||
extern const LexerModule lmTeX;
|
||||
extern const LexerModule lmTOML;
|
||||
extern const LexerModule lmTroff;
|
||||
extern const LexerModule lmTxt2tags;
|
||||
extern const LexerModule lmVB;
|
||||
extern const LexerModule lmVBScript;
|
||||
extern const LexerModule lmVerilog;
|
||||
extern const LexerModule lmVHDL;
|
||||
extern const LexerModule lmVisualProlog;
|
||||
extern const LexerModule lmX12;
|
||||
extern const LexerModule lmXML;
|
||||
extern const LexerModule lmYAML;
|
||||
extern const LexerModule lmZig;
|
||||
|
||||
//--Autogenerated -- end of automatically generated section
|
||||
|
||||
@ -98,67 +182,151 @@ void AddEachLexer() {
|
||||
catalogueLexilla.AddLexerModules({
|
||||
//++Autogenerated -- run scripts/LexillaGen.py to regenerate
|
||||
//**\(\t\t&\*,\n\)
|
||||
&lmAHK,
|
||||
&lmA68k,
|
||||
&lmAbaqus,
|
||||
&lmAda,
|
||||
&lmAPDL,
|
||||
&lmAs,
|
||||
&lmAsciidoc,
|
||||
&lmAsm,
|
||||
&lmAsn1,
|
||||
&lmASY,
|
||||
&lmAU3,
|
||||
&lmAVE,
|
||||
&lmAVS,
|
||||
&lmBaan,
|
||||
&lmBash,
|
||||
&lmBatch,
|
||||
&lmBibTeX,
|
||||
&lmBlitzBasic,
|
||||
&lmBullant,
|
||||
&lmCaml,
|
||||
&lmCIL,
|
||||
&lmClw,
|
||||
&lmClwNoCase,
|
||||
&lmCmake,
|
||||
&lmCOBOL,
|
||||
&lmCoffeeScript,
|
||||
&lmConf,
|
||||
&lmCPP,
|
||||
&lmCPPNoCase,
|
||||
&lmCsound,
|
||||
&lmCss,
|
||||
&lmCSV,
|
||||
&lmD,
|
||||
&lmDart,
|
||||
&lmDataflex,
|
||||
&lmDiff,
|
||||
&lmDMAP,
|
||||
&lmDMIS,
|
||||
&lmECL,
|
||||
&lmEDIFACT,
|
||||
&lmEiffel,
|
||||
&lmEiffelkw,
|
||||
&lmErlang,
|
||||
&lmErrorList,
|
||||
&lmESCRIPT,
|
||||
&lmF77,
|
||||
&lmFlagShip,
|
||||
&lmForth,
|
||||
&lmFortran,
|
||||
&lmFreeBasic,
|
||||
&lmFSharp,
|
||||
&lmGAP,
|
||||
&lmGDScript,
|
||||
&lmGui4Cli,
|
||||
&lmHaskell,
|
||||
&lmHollywood,
|
||||
&lmHTML,
|
||||
&lmIHex,
|
||||
&lmIndent,
|
||||
&lmInno,
|
||||
&lmJSON,
|
||||
&lmJulia,
|
||||
&lmKix,
|
||||
&lmKotlin,
|
||||
&lmKVIrc,
|
||||
&lmLatex,
|
||||
&lmLISP,
|
||||
&lmLiterateHaskell,
|
||||
&lmLot,
|
||||
&lmLout,
|
||||
&lmLua,
|
||||
&lmMagikSF,
|
||||
&lmMake,
|
||||
&lmMarkdown,
|
||||
&lmMatlab,
|
||||
&lmMaxima,
|
||||
&lmMETAPOST,
|
||||
&lmMMIXAL,
|
||||
&lmModula,
|
||||
&lmMSSQL,
|
||||
&lmMySQL,
|
||||
&lmNim,
|
||||
&lmNimrod,
|
||||
&lmNix,
|
||||
&lmNncrontab,
|
||||
&lmNsis,
|
||||
&lmNull,
|
||||
&lmOctave,
|
||||
&lmOpal,
|
||||
&lmOScript,
|
||||
&lmPascal,
|
||||
&lmPB,
|
||||
&lmPerl,
|
||||
&lmPHPSCRIPT,
|
||||
&lmPLM,
|
||||
&lmPO,
|
||||
&lmPOV,
|
||||
&lmPowerPro,
|
||||
&lmPowerShell,
|
||||
&lmProgress,
|
||||
&lmProps,
|
||||
&lmPS,
|
||||
&lmPureBasic,
|
||||
&lmPython,
|
||||
&lmR,
|
||||
&lmRaku,
|
||||
&lmREBOL,
|
||||
&lmRegistry,
|
||||
&lmRuby,
|
||||
&lmRust,
|
||||
&lmSAS,
|
||||
&lmScriptol,
|
||||
&lmSINEX,
|
||||
&lmSmalltalk,
|
||||
&lmSML,
|
||||
&lmSorc,
|
||||
&lmSpecman,
|
||||
&lmSpice,
|
||||
&lmSQL,
|
||||
&lmSysVerilog,
|
||||
&lmSrec,
|
||||
&lmStata,
|
||||
&lmSTTXT,
|
||||
&lmTACL,
|
||||
&lmTADS3,
|
||||
&lmTAL,
|
||||
&lmTCL,
|
||||
&lmTCMD,
|
||||
&lmTEHex,
|
||||
&lmTeX,
|
||||
&lmTOML,
|
||||
&lmTroff,
|
||||
&lmTxt2tags,
|
||||
&lmVB,
|
||||
&lmVBScript,
|
||||
&lmVerilog,
|
||||
&lmVHDL,
|
||||
&lmVisualProlog,
|
||||
&lmX12,
|
||||
&lmXML,
|
||||
&lmYAML,
|
||||
&lmZig,
|
||||
|
||||
//--Autogenerated -- end of automatically generated section
|
||||
});
|
||||
});
|
||||
|
||||
} // AddEachLexer()
|
||||
}
|
||||
|
||||
} // namspace
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
9
lexilla/src/Lexilla.def
Normal file
9
lexilla/src/Lexilla.def
Normal file
@ -0,0 +1,9 @@
|
||||
EXPORTS
|
||||
GetLexerCount
|
||||
GetLexerName
|
||||
GetLexerFactory
|
||||
CreateLexer
|
||||
LexerNameFromID
|
||||
GetLibraryPropertyNames
|
||||
SetLibraryProperty
|
||||
GetNameSpace
|
||||
34
lexilla/src/Lexilla.pro
Normal file
34
lexilla/src/Lexilla.pro
Normal file
@ -0,0 +1,34 @@
|
||||
# This Qt Creator project file is not meant for creating Lexilla libraries
|
||||
# but instead for easily running Clang-Tidy on lexers.
|
||||
|
||||
QT += core
|
||||
|
||||
TARGET = Lexilla
|
||||
TEMPLATE = lib
|
||||
CONFIG += lib_bundle
|
||||
CONFIG += c++1z
|
||||
|
||||
VERSION = 5.1.3
|
||||
|
||||
SOURCES += \
|
||||
Lexilla.cxx \
|
||||
$$files(../lexlib/*.cxx, false) \
|
||||
$$files(../lexers/*.cxx, false)
|
||||
|
||||
HEADERS += \
|
||||
../include/Lexilla.h \
|
||||
$$files(../lexlib/*.h, false) \
|
||||
$$files(../lexers/*.h, false)
|
||||
|
||||
INCLUDEPATH += ../include ../lexlib ../../scintilla/include
|
||||
|
||||
DEFINES += _CRT_SECURE_NO_DEPRECATE=1
|
||||
CONFIG(release, debug|release) {
|
||||
DEFINES += NDEBUG=1
|
||||
}
|
||||
|
||||
DESTDIR = ../bin
|
||||
|
||||
macx {
|
||||
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Frameworks/
|
||||
}
|
||||
13
lexilla/src/Lexilla.ruleset
Normal file
13
lexilla/src/Lexilla.ruleset
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RuleSet Name="Lexilla Rules" Description="A set of rules for Lexilla. Don't check for owner, not_null, gsl::at, simple array access." ToolsVersion="17.0">
|
||||
<IncludeAll Action="Warning" />
|
||||
<Rules AnalyzerId="Microsoft.Analyzers.NativeCodeAnalysis" RuleNamespace="Microsoft.Rules.Native">
|
||||
<Rule Id="C26400" Action="None" />
|
||||
<Rule Id="C26429" Action="None" />
|
||||
<Rule Id="C26446" Action="None" />
|
||||
<Rule Id="C26455" Action="None" />
|
||||
<Rule Id="C26481" Action="None" />
|
||||
<Rule Id="C26482" Action="None" />
|
||||
<Rule Id="C26485" Action="None" />
|
||||
</Rules>
|
||||
</RuleSet>
|
||||
@ -27,9 +27,9 @@
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{19CCA8B8-46B9-4609-B7CE-198DA19F07BD}</ProjectGuid>
|
||||
<ProjectGuid>{E541C9BE-13BC-4CE6-A0A4-31145F51A2C1}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>Scintilla</RootNamespace>
|
||||
<RootNamespace>Lexilla</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
@ -68,62 +68,52 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<IntDir>Intermediates\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<IntDir>Intermediates\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<IntDir>Intermediates\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<IntDir>Intermediates\$(Configuration)\</IntDir>
|
||||
<EnableClangTidyCodeAnalysis>true</EnableClangTidyCodeAnalysis>
|
||||
<CodeAnalysisRuleSet>Lexilla.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<PreprocessorDefinitions>SCI_EMPTYCATALOGUE;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\include;..\src;</AdditionalIncludeDirectories>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_DEPRECATE;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\scintilla\include;..\lexlib;</AdditionalIncludeDirectories>
|
||||
<BrowseInformation>false</BrowseInformation>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalOptions>/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>gdi32.lib;imm32.lib;ole32.lib;oleaut32.lib;msimg32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<CETCompat>true</CETCompat>
|
||||
<ModuleDefinitionFile>Lexilla.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
<CETCompat>true</CETCompat>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
<CETCompat>true</CETCompat>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
<CETCompat>false</CETCompat>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@ -131,12 +121,10 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<CETCompat>true</CETCompat>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@ -144,12 +132,10 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<CETCompat>true</CETCompat>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
|
||||
@ -157,27 +143,24 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<CETCompat>false</CETCompat>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\*.cxx" />
|
||||
<ClCompile Include="..\win32\HanjaDic.cxx" />
|
||||
<ClCompile Include="..\win32\PlatWin.cxx" />
|
||||
<ClCompile Include="..\win32\ScintillaWin.cxx" />
|
||||
<ClCompile Include="..\win32\ScintillaDLL.cxx" />
|
||||
<ClCompile Include="..\lexers\*.cxx" />
|
||||
<ClCompile Include="..\lexlib\*.cxx" />
|
||||
<ClCompile Include="..\src\Lexilla.cxx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\include\*.h" />
|
||||
<ClInclude Include="..\src\*.h" />
|
||||
<ClInclude Include="..\win32\*.h" />
|
||||
<ClInclude Include="..\include\SciLexer.h" />
|
||||
<ClInclude Include="..\lexlib\*.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\win32\ScintRes.rc" />
|
||||
<ResourceCompile Include="..\src\LexillaVersion.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
@ -15,7 +15,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>5.4.5</string>
|
||||
<string>5.4.6</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
||||
@ -161,10 +161,7 @@
|
||||
0DFB4F5F94B018794ADB389D /* LexDart.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 1F274010A7943C43BA265511 /* LexDart.cxx */; };
|
||||
CEC8496B8D9712E6EEDBC301 /* LexZig.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 71684CF6BCC80369BCE2F893 /* LexZig.cxx */; };
|
||||
4A444CF5A75E52E2C5537328 /* LexNix.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 81E2488CB0A0DC6B67AA08DD /* LexNix.cxx */; };
|
||||
BB044596AE5BF36880B8B4AE /* LexAHK.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 62E346ACA93C6685F7D1173B /* LexAHK.cxx */; };
|
||||
939949838A31265F78C59DB4 /* LexCSV.cxx in Sources */ = {isa = PBXBuildFile; fileRef = B85A474396AEFA29F274960F /* LexCSV.cxx */; };
|
||||
775B43F7A841DE6F76D670E2 /* LexerUtils.cxx in Sources */ = {isa = PBXBuildFile; fileRef = D50442879C41BD2B219ECCFA /* LexerUtils.cxx */; };
|
||||
A9604C459C5401B68E91D6C1 /* LexKotlin.cxx in Sources */ = {isa = PBXBuildFile; fileRef = BA174A3A9F378A665382BA40 /* LexKotlin.cxx */; };
|
||||
FE5F4B168F37B523E4D1EFCD /* LexSINEX.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 0D814275A1A8A9FA6D10447C /* LexSINEX.cxx */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
@ -324,10 +321,7 @@
|
||||
1F274010A7943C43BA265511 /* LexDart.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexDart.cxx; path = ../../lexers/LexDart.cxx; sourceTree = SOURCE_ROOT; };
|
||||
71684CF6BCC80369BCE2F893 /* LexZig.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexZig.cxx; path = ../../lexers/LexZig.cxx; sourceTree = SOURCE_ROOT; };
|
||||
81E2488CB0A0DC6B67AA08DD /* LexNix.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexNix.cxx; path = ../../lexers/LexNix.cxx; sourceTree = SOURCE_ROOT; };
|
||||
62E346ACA93C6685F7D1173B /* LexAHK.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAHK.cxx; path = ../../lexers/LexAHK.cxx; sourceTree = SOURCE_ROOT; };
|
||||
B85A474396AEFA29F274960F /* LexCSV.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCSV.cxx; path = ../../lexers/LexCSV.cxx; sourceTree = SOURCE_ROOT; };
|
||||
D50442879C41BD2B219ECCFA /* LexerUtils.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexerUtils.cxx; path = ../../lexers/LexerUtils.cxx; sourceTree = SOURCE_ROOT; };
|
||||
BA174A3A9F378A665382BA40 /* LexKotlin.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexKotlin.cxx; path = ../../lexers/LexKotlin.cxx; sourceTree = SOURCE_ROOT; };
|
||||
0D814275A1A8A9FA6D10447C /* LexSINEX.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSINEX.cxx; path = ../../lexers/LexSINEX.cxx; sourceTree = SOURCE_ROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@ -375,7 +369,6 @@
|
||||
28BA730624E34D9400272C2D /* LexA68k.cxx */,
|
||||
28BA72EE24E34D9300272C2D /* LexAbaqus.cxx */,
|
||||
28BA730024E34D9400272C2D /* LexAda.cxx */,
|
||||
62E346ACA93C6685F7D1173B /* LexAHK.cxx */,
|
||||
28BA72DF24E34D9200272C2D /* LexAPDL.cxx */,
|
||||
3AF14420BFC43876F16C5995 /* LexAsciidoc.cxx */,
|
||||
28BA72FF24E34D9400272C2D /* LexAsm.cxx */,
|
||||
@ -401,7 +394,6 @@
|
||||
28BA730124E34D9400272C2D /* LexCrontab.cxx */,
|
||||
28BA731524E34D9500272C2D /* LexCsound.cxx */,
|
||||
28BA732924E34D9600272C2D /* LexCSS.cxx */,
|
||||
B85A474396AEFA29F274960F /* LexCSV.cxx */,
|
||||
28BA72E024E34D9200272C2D /* LexD.cxx */,
|
||||
1F274010A7943C43BA265511 /* LexDart.cxx */,
|
||||
28BA732C24E34D9600272C2D /* LexDataflex.cxx */,
|
||||
@ -413,7 +405,6 @@
|
||||
28BA72D924E34D9200272C2D /* LexEiffel.cxx */,
|
||||
28BA72E824E34D9200272C2D /* LexErlang.cxx */,
|
||||
28BA72EB24E34D9300272C2D /* LexErrorList.cxx */,
|
||||
D50442879C41BD2B219ECCFA /* LexerUtils.cxx */,
|
||||
28BA72F624E34D9300272C2D /* LexEScript.cxx */,
|
||||
28BA72EC24E34D9300272C2D /* LexFlagship.cxx */,
|
||||
28BA72CB24E34D9100272C2D /* LexForth.cxx */,
|
||||
@ -431,7 +422,6 @@
|
||||
28BA733024E34D9600272C2D /* LexJSON.cxx */,
|
||||
315E4E969868C52C125686B2 /* LexJulia.cxx */,
|
||||
28BA731124E34D9500272C2D /* LexKix.cxx */,
|
||||
BA174A3A9F378A665382BA40 /* LexKotlin.cxx */,
|
||||
28BA72F824E34D9300272C2D /* LexKVIrc.cxx */,
|
||||
28BA72ED24E34D9300272C2D /* LexLaTeX.cxx */,
|
||||
28BA72E424E34D9200272C2D /* LexLisp.cxx */,
|
||||
@ -475,6 +465,7 @@
|
||||
28BA733824E34D9700272C2D /* LexRust.cxx */,
|
||||
28BA72D224E34D9200272C2D /* LexSAS.cxx */,
|
||||
28BA731D24E34D9500272C2D /* LexScriptol.cxx */,
|
||||
0D814275A1A8A9FA6D10447C /* LexSINEX.cxx */,
|
||||
28BA72D424E34D9200272C2D /* LexSmalltalk.cxx */,
|
||||
28BA72CC24E34D9100272C2D /* LexSML.cxx */,
|
||||
28BA72DE24E34D9200272C2D /* LexSorcus.cxx */,
|
||||
@ -761,10 +752,7 @@
|
||||
0DFB4F5F94B018794ADB389D /* LexDart.cxx in Sources */,
|
||||
CEC8496B8D9712E6EEDBC301 /* LexZig.cxx in Sources */,
|
||||
4A444CF5A75E52E2C5537328 /* LexNix.cxx in Sources */,
|
||||
BB044596AE5BF36880B8B4AE /* LexAHK.cxx in Sources */,
|
||||
939949838A31265F78C59DB4 /* LexCSV.cxx in Sources */,
|
||||
775B43F7A841DE6F76D670E2 /* LexerUtils.cxx in Sources */,
|
||||
A9604C459C5401B68E91D6C1 /* LexKotlin.cxx in Sources */,
|
||||
FE5F4B168F37B523E4D1EFCD /* LexSINEX.cxx in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -892,7 +880,7 @@
|
||||
buildSettings = {
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 5.4.5;
|
||||
CURRENT_PROJECT_VERSION = 5.4.6;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = 4F446KW87E;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
@ -920,7 +908,7 @@
|
||||
buildSettings = {
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 5.4.5;
|
||||
CURRENT_PROJECT_VERSION = 5.4.6;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = 4F446KW87E;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -4,8 +4,8 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#define VERSION_LEXILLA "5.4.5"
|
||||
#define VERSION_WORDS 5, 4, 5, 0
|
||||
#define VERSION_LEXILLA "5.4.6"
|
||||
#define VERSION_WORDS 5, 4, 6, 0
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION VERSION_WORDS
|
||||
@ -25,11 +25,11 @@ BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Neil Hodgson neilh@scintilla.org\0"
|
||||
VALUE "FileDescription", "Lexilla.lib - a Lexical Analysis Component\0"
|
||||
VALUE "FileDescription", "Lexilla.DLL - a Lexical Analysis Component\0"
|
||||
VALUE "FileVersion", VERSION_LEXILLA "\0"
|
||||
VALUE "InternalName", "Lexilla\0"
|
||||
VALUE "LegalCopyright", "Copyright 2019 by Neil Hodgson\0"
|
||||
VALUE "OriginalFilename", "Lexilla.lib\0"
|
||||
VALUE "OriginalFilename", "Lexilla.DLL\0"
|
||||
VALUE "ProductName", "Lexilla\0"
|
||||
VALUE "ProductVersion", VERSION_LEXILLA "\0"
|
||||
END
|
||||
|
||||
1097
lexilla/src/deps.mak
1097
lexilla/src/deps.mak
File diff suppressed because it is too large
Load Diff
@ -92,53 +92,130 @@ $(SCINTILLA_INCLUDE):
|
||||
#++Autogenerated -- run scripts/LexGen.py to regenerate
|
||||
#**LEX_OBJS=\\\n\(\t$(DIR_O)\\\*.obj \\\n\)
|
||||
LEX_OBJS=\
|
||||
$(DIR_O)\LexA68k.obj \
|
||||
$(DIR_O)\LexAbaqus.obj \
|
||||
$(DIR_O)\LexAda.obj \
|
||||
$(DIR_O)\LexAPDL.obj \
|
||||
$(DIR_O)\LexAsciidoc.obj \
|
||||
$(DIR_O)\LexAsm.obj \
|
||||
$(DIR_O)\LexAsn1.obj \
|
||||
$(DIR_O)\LexASY.obj \
|
||||
$(DIR_O)\LexAU3.obj \
|
||||
$(DIR_O)\LexAVE.obj \
|
||||
$(DIR_O)\LexAVS.obj \
|
||||
$(DIR_O)\LexBaan.obj \
|
||||
$(DIR_O)\LexBash.obj \
|
||||
$(DIR_O)\LexBasic.obj \
|
||||
$(DIR_O)\LexBatch.obj \
|
||||
$(DIR_O)\LexBibTeX.obj \
|
||||
$(DIR_O)\LexBullant.obj \
|
||||
$(DIR_O)\LexCaml.obj \
|
||||
$(DIR_O)\LexCIL.obj \
|
||||
$(DIR_O)\LexCLW.obj \
|
||||
$(DIR_O)\LexCmake.obj \
|
||||
$(DIR_O)\LexCOBOL.obj \
|
||||
$(DIR_O)\LexCoffeeScript.obj \
|
||||
$(DIR_O)\LexConf.obj \
|
||||
$(DIR_O)\LexCPP.obj \
|
||||
$(DIR_O)\LexCrontab.obj \
|
||||
$(DIR_O)\LexCsound.obj \
|
||||
$(DIR_O)\LexCSS.obj \
|
||||
$(DIR_O)\LexD.obj \
|
||||
$(DIR_O)\LexDart.obj \
|
||||
$(DIR_O)\LexDataflex.obj \
|
||||
$(DIR_O)\LexDiff.obj \
|
||||
$(DIR_O)\LexDMAP.obj \
|
||||
$(DIR_O)\LexDMIS.obj \
|
||||
$(DIR_O)\LexECL.obj \
|
||||
$(DIR_O)\LexEDIFACT.obj \
|
||||
$(DIR_O)\LexEiffel.obj \
|
||||
$(DIR_O)\LexErlang.obj \
|
||||
$(DIR_O)\LexErrorList.obj \
|
||||
$(DIR_O)\LexEScript.obj \
|
||||
$(DIR_O)\LexFlagship.obj \
|
||||
$(DIR_O)\LexForth.obj \
|
||||
$(DIR_O)\LexFortran.obj \
|
||||
$(DIR_O)\LexFSharp.obj \
|
||||
$(DIR_O)\LexGAP.obj \
|
||||
$(DIR_O)\LexGDScript.obj \
|
||||
$(DIR_O)\LexGui4Cli.obj \
|
||||
$(DIR_O)\LexHaskell.obj \
|
||||
$(DIR_O)\LexHex.obj \
|
||||
$(DIR_O)\LexHollywood.obj \
|
||||
$(DIR_O)\LexHTML.obj \
|
||||
$(DIR_O)\LexIndent.obj \
|
||||
$(DIR_O)\LexInno.obj \
|
||||
$(DIR_O)\LexJSON.obj \
|
||||
$(DIR_O)\LexJulia.obj \
|
||||
$(DIR_O)\LexKix.obj \
|
||||
$(DIR_O)\LexKVIrc.obj \
|
||||
$(DIR_O)\LexLaTeX.obj \
|
||||
$(DIR_O)\LexLisp.obj \
|
||||
$(DIR_O)\LexLout.obj \
|
||||
$(DIR_O)\LexLua.obj \
|
||||
$(DIR_O)\LexMagik.obj \
|
||||
$(DIR_O)\LexMake.obj \
|
||||
$(DIR_O)\LexMarkdown.obj \
|
||||
$(DIR_O)\LexMatlab.obj \
|
||||
$(DIR_O)\LexMaxima.obj \
|
||||
$(DIR_O)\LexMetapost.obj \
|
||||
$(DIR_O)\LexMMIXAL.obj \
|
||||
$(DIR_O)\LexModula.obj \
|
||||
$(DIR_O)\LexMPT.obj \
|
||||
$(DIR_O)\LexMSSQL.obj \
|
||||
$(DIR_O)\LexMySQL.obj \
|
||||
$(DIR_O)\LexNim.obj \
|
||||
$(DIR_O)\LexNimrod.obj \
|
||||
$(DIR_O)\LexNix.obj \
|
||||
$(DIR_O)\LexNsis.obj \
|
||||
$(DIR_O)\LexNull.obj \
|
||||
$(DIR_O)\LexOpal.obj \
|
||||
$(DIR_O)\LexOScript.obj \
|
||||
$(DIR_O)\LexPascal.obj \
|
||||
$(DIR_O)\LexPB.obj \
|
||||
$(DIR_O)\LexPerl.obj \
|
||||
$(DIR_O)\LexPLM.obj \
|
||||
$(DIR_O)\LexPO.obj \
|
||||
$(DIR_O)\LexPOV.obj \
|
||||
$(DIR_O)\LexPowerPro.obj \
|
||||
$(DIR_O)\LexPowerShell.obj \
|
||||
$(DIR_O)\LexProgress.obj \
|
||||
$(DIR_O)\LexProps.obj \
|
||||
$(DIR_O)\LexPS.obj \
|
||||
$(DIR_O)\LexPython.obj \
|
||||
$(DIR_O)\LexR.obj \
|
||||
$(DIR_O)\LexRaku.obj \
|
||||
$(DIR_O)\LexRebol.obj \
|
||||
$(DIR_O)\LexRegistry.obj \
|
||||
$(DIR_O)\LexRuby.obj \
|
||||
$(DIR_O)\LexRust.obj \
|
||||
$(DIR_O)\LexSAS.obj \
|
||||
$(DIR_O)\LexScriptol.obj \
|
||||
$(DIR_O)\LexSINEX.obj \
|
||||
$(DIR_O)\LexSmalltalk.obj \
|
||||
$(DIR_O)\LexSML.obj \
|
||||
$(DIR_O)\LexSorcus.obj \
|
||||
$(DIR_O)\LexSpecman.obj \
|
||||
$(DIR_O)\LexSpice.obj \
|
||||
$(DIR_O)\LexSQL.obj \
|
||||
$(DIR_O)\LexStata.obj \
|
||||
$(DIR_O)\LexSTTXT.obj \
|
||||
$(DIR_O)\LexTACL.obj \
|
||||
$(DIR_O)\LexTADS3.obj \
|
||||
$(DIR_O)\LexTAL.obj \
|
||||
$(DIR_O)\LexTCL.obj \
|
||||
$(DIR_O)\LexTCMD.obj \
|
||||
$(DIR_O)\LexTeX.obj \
|
||||
$(DIR_O)\LexTOML.obj \
|
||||
$(DIR_O)\LexTroff.obj \
|
||||
$(DIR_O)\LexTxt2tags.obj \
|
||||
$(DIR_O)\LexVB.obj \
|
||||
$(DIR_O)\LexVHDL.obj \
|
||||
$(DIR_O)\LexYAML.obj \
|
||||
$(DIR_O)\LexAHK.obj \
|
||||
$(DIR_O)\LexCSV.obj \
|
||||
$(DIR_O)\LexerUtils.obj \
|
||||
$(DIR_O)\LexJSON.obj \
|
||||
$(DIR_O)\LexKotlin.obj \
|
||||
$(DIR_O)\LexVerilog.obj \
|
||||
$(DIR_O)\LexVHDL.obj \
|
||||
$(DIR_O)\LexVisualProlog.obj \
|
||||
$(DIR_O)\LexX12.obj \
|
||||
$(DIR_O)\LexYAML.obj \
|
||||
$(DIR_O)\LexZig.obj \
|
||||
|
||||
#--Autogenerated -- end of automatically generated section
|
||||
|
||||
|
||||
143
lexilla/src/makefile
Normal file
143
lexilla/src/makefile
Normal file
@ -0,0 +1,143 @@
|
||||
# Make file for Lexilla
|
||||
# @file makefile
|
||||
# Copyright 2019 by Neil Hodgson <neilh@scintilla.org>
|
||||
# The License.txt file describes the conditions under which this software may be distributed.
|
||||
# This works on Windows or Linux using GCC 9.0+
|
||||
# This works on Windows, Linux, or macOS using Clang 9.0+
|
||||
# On Windows, it is tested with Mingw-w64 GCC and Clang.
|
||||
# on macOS, it always uses Clang
|
||||
# For debug versions define DEBUG on the command line:
|
||||
# make DEBUG=1
|
||||
# On Windows, to build with MSVC, run lexilla.mak
|
||||
|
||||
.PHONY: all clean analyze depend
|
||||
|
||||
.SUFFIXES: .cxx
|
||||
|
||||
DIR_O=.
|
||||
DIR_BIN=../bin
|
||||
|
||||
WARNINGS = -Wpedantic -Wall -Wextra
|
||||
|
||||
ifdef windir
|
||||
SHARED_NAME = lexilla
|
||||
SHAREDEXTENSION = dll
|
||||
WINDRES ?= windres
|
||||
VERSION_RESOURCE = $(DIR_O)/LexillaVersion.o
|
||||
else
|
||||
SHARED_NAME = liblexilla
|
||||
ifeq ($(shell uname),Darwin)
|
||||
CLANG := 1
|
||||
LDFLAGS += -dynamiclib
|
||||
SHAREDEXTENSION = dylib
|
||||
BASE_FLAGS += -arch arm64 -arch x86_64
|
||||
LDFLAGS += -arch arm64 -arch x86_64
|
||||
else
|
||||
SHAREDEXTENSION = so
|
||||
endif
|
||||
BASE_FLAGS += -fvisibility=hidden
|
||||
endif
|
||||
|
||||
LEXILLA=$(DIR_BIN)/$(SHARED_NAME).$(SHAREDEXTENSION)
|
||||
LIBLEXILLA=$(DIR_BIN)/liblexilla.a
|
||||
|
||||
BASE_FLAGS += --std=c++17
|
||||
|
||||
ifdef CLANG
|
||||
CXX = clang++
|
||||
ifdef windir
|
||||
# Clang on Win32 uses MSVC headers so will complain about strcpy without this
|
||||
DEFINES += -D_CRT_SECURE_NO_DEPRECATE=1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef windir
|
||||
LDFLAGS += -mwindows
|
||||
ifndef CLANG
|
||||
LDFLAGS += -Wl,--kill-at
|
||||
endif
|
||||
else
|
||||
BASE_FLAGS += -fPIC
|
||||
endif
|
||||
|
||||
# Take care of changing Unix style '/' directory separator to '\' on Windows
|
||||
normalize = $(if $(windir),$(subst /,\,$1),$1)
|
||||
|
||||
PYTHON = $(if $(windir),pyw,python3)
|
||||
|
||||
ifdef windir
|
||||
DEL = $(if $(wildcard $(dir $(SHELL))rm.exe), $(dir $(SHELL))rm.exe -f, del /q)
|
||||
else
|
||||
DEL = rm -f
|
||||
endif
|
||||
|
||||
RANLIB ?= ranlib
|
||||
|
||||
SCINTILLA_INCLUDE = ../../scintilla/include
|
||||
|
||||
vpath %.h ../include ../../scintilla/include ../lexlib
|
||||
vpath %.cxx ../src ../lexlib ../lexers
|
||||
|
||||
DEFINES += -D$(if $(DEBUG),DEBUG,NDEBUG)
|
||||
BASE_FLAGS += $(if $(DEBUG),-g,-O3)
|
||||
|
||||
INCLUDES = -I ../include -I $(SCINTILLA_INCLUDE) -I ../lexlib
|
||||
LDFLAGS += -shared
|
||||
|
||||
BASE_FLAGS += $(WARNINGS)
|
||||
|
||||
all: $(SCINTILLA_INCLUDE) $(LEXILLA) $(LIBLEXILLA)
|
||||
|
||||
clean:
|
||||
$(DEL) $(call normalize, $(addprefix $(DIR_O)/, *.o *.obj *.a *.res *.map *.plist) $(LEXILLA) $(LIBLEXILLA))
|
||||
|
||||
$(DIR_O)/%.o: %.cxx
|
||||
$(CXX) $(DEFINES) $(INCLUDES) $(BASE_FLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
$(DIR_O)/%.o: %.rc
|
||||
$(WINDRES) $< $@
|
||||
|
||||
analyze:
|
||||
$(CXX) --analyze $(DEFINES) $(INCLUDES) $(BASE_FLAGS) $(CXXFLAGS) *.cxx ../lexlib/*.cxx ../lexers/*.cxx
|
||||
|
||||
depend deps.mak:
|
||||
$(PYTHON) DepGen.py
|
||||
|
||||
$(SCINTILLA_INCLUDE):
|
||||
@echo Scintilla must be installed at ../../scintilla to provide access to Scintilla headers.
|
||||
|
||||
LEXERS:=$(sort $(notdir $(wildcard ../lexers/Lex*.cxx)))
|
||||
|
||||
OBJS = Lexilla.o
|
||||
|
||||
# Required by lexers
|
||||
LEXLIB_OBJS=\
|
||||
Accessor.o \
|
||||
CharacterCategory.o \
|
||||
CharacterSet.o \
|
||||
DefaultLexer.o \
|
||||
InList.o \
|
||||
LexAccessor.o \
|
||||
LexerBase.o \
|
||||
LexerModule.o \
|
||||
LexerSimple.o \
|
||||
PropSetSimple.o \
|
||||
StyleContext.o \
|
||||
WordList.o
|
||||
|
||||
# Required by libraries and DLLs that include lexing
|
||||
LEXILLA_OBJS := $(addprefix $(DIR_O)/, $(OBJS) $(LEXLIB_OBJS) $(LEXERS:.cxx=.o))
|
||||
|
||||
$(LEXILLA): $(LEXILLA_OBJS) $(VERSION_RESOURCE)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@
|
||||
|
||||
$(LIBLEXILLA): $(LEXILLA_OBJS)
|
||||
ifeq ($(SHAREDEXTENSION),dylib)
|
||||
libtool -static -o $@ $^
|
||||
else
|
||||
$(AR) rc $@ $^
|
||||
$(RANLIB) $@
|
||||
endif
|
||||
|
||||
# Automatically generate dependencies for most files with "make deps"
|
||||
include deps.mak
|
||||
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
||||
545
|
||||
546
|
||||
@ -18,7 +18,7 @@ public:
|
||||
virtual int SCI_METHOD Release() = 0;
|
||||
// Returns a status code from SC_STATUS_*
|
||||
virtual int SCI_METHOD AddData(const char *data, Sci_Position length) = 0;
|
||||
virtual void * SCI_METHOD ConvertToDocument() noexcept = 0;
|
||||
virtual void * SCI_METHOD ConvertToDocument() = 0;
|
||||
};
|
||||
|
||||
static constexpr int deRelease0 = 0;
|
||||
|
||||
@ -9,11 +9,7 @@
|
||||
#ifndef SCI_POSITION_H
|
||||
#define SCI_POSITION_H
|
||||
|
||||
#if defined(__cplusplus)
|
||||
#include <cstddef>
|
||||
#else
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
// Basic signed type used throughout interface
|
||||
typedef ptrdiff_t Sci_Position;
|
||||
|
||||
@ -96,9 +96,6 @@ val INVALID_POSITION=-1
|
||||
val SCI_START=2000
|
||||
val SCI_OPTIONAL_START=3000
|
||||
val SCI_LEXER_START=4000
|
||||
# >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
val SCI_DEV_USER_DEFINED=6000
|
||||
# <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
|
||||
# Add text to the document at current position.
|
||||
fun void AddText=2001(position length, string text)
|
||||
@ -619,11 +616,6 @@ fun void StyleResetDefault=2058(,)
|
||||
# Set a style to be underlined or not.
|
||||
set void StyleSetUnderline=2059(int style, bool underline)
|
||||
|
||||
# >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
# Set a style to be underlined or not.
|
||||
set void StyleSetStrike=6001(int style, bool strike)
|
||||
# <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
|
||||
enu CaseVisible=SC_CASE_
|
||||
val SC_CASE_MIXED=0
|
||||
val SC_CASE_UPPER=1
|
||||
@ -656,11 +648,6 @@ get bool StyleGetEOLFilled=2487(int style,)
|
||||
# Get is a style underlined or not.
|
||||
get bool StyleGetUnderline=2488(int style,)
|
||||
|
||||
# >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
# Get is a style underlined or not.
|
||||
get bool StyleGetStrike=6002(int style,)
|
||||
# <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
|
||||
# Get is a style mixed case, or to force upper or lower case.
|
||||
get CaseVisible StyleGetCase=2489(int style,)
|
||||
|
||||
@ -1318,9 +1305,6 @@ enu FindOption=SCFIND_
|
||||
val SCFIND_NONE=0x0
|
||||
val SCFIND_WHOLEWORD=0x2
|
||||
val SCFIND_MATCHCASE=0x4
|
||||
# >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
val SCFIND_DOT_MATCH_ALL=0x1000
|
||||
# <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
val SCFIND_WORDSTART=0x00100000
|
||||
val SCFIND_REGEXP=0x00200000
|
||||
val SCFIND_POSIX=0x00400000
|
||||
@ -2265,12 +2249,6 @@ fun void UsePopUp=2371(PopUp popUpMode,)
|
||||
# Is the selection rectangular? The alternative is the more common stream selection.
|
||||
get bool SelectionIsRectangle=2372(,)
|
||||
|
||||
# >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
# 2018-09-06 change zoom level and print magnification to percent value
|
||||
val SC_MIN_ZOOM_LEVEL=10
|
||||
val SC_MAX_ZOOM_LEVEL=1000
|
||||
# <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
|
||||
# Set the zoom level. This number of points is added to the size of all fonts.
|
||||
# It may be positive to magnify or negative to reduce.
|
||||
set void SetZoom=2373(int zoomInPoints,)
|
||||
@ -3296,7 +3274,7 @@ fun void Colourise=4003(position start, position end)
|
||||
set void SetProperty=4004(string key, string value)
|
||||
|
||||
# Maximum value of keywordSet parameter of SetKeyWords.
|
||||
val KEYWORDSET_MAX=15
|
||||
val KEYWORDSET_MAX=8
|
||||
|
||||
# Set up the key words used by the lexer.
|
||||
set void SetKeyWords=4005(int keyWordSet, string keyWords)
|
||||
|
||||
@ -186,7 +186,6 @@ public:
|
||||
void StyleSetEOLFilled(int style, bool eolFilled);
|
||||
void StyleResetDefault();
|
||||
void StyleSetUnderline(int style, bool underline);
|
||||
void StyleSetStrike(int style, bool strike);
|
||||
Colour StyleGetFore(int style);
|
||||
Colour StyleGetBack(int style);
|
||||
bool StyleGetBold(int style);
|
||||
@ -196,7 +195,6 @@ public:
|
||||
std::string StyleGetFont(int style);
|
||||
bool StyleGetEOLFilled(int style);
|
||||
bool StyleGetUnderline(int style);
|
||||
bool StyleGetStrike(int style);
|
||||
Scintilla::CaseVisible StyleGetCase(int style);
|
||||
Scintilla::CharacterSet StyleGetCharacterSet(int style);
|
||||
bool StyleGetVisible(int style);
|
||||
|
||||
@ -115,7 +115,6 @@ enum class Message {
|
||||
StyleSetEOLFilled = 2057,
|
||||
StyleResetDefault = 2058,
|
||||
StyleSetUnderline = 2059,
|
||||
StyleSetStrike = 6001,
|
||||
StyleGetFore = 2481,
|
||||
StyleGetBack = 2482,
|
||||
StyleGetBold = 2483,
|
||||
@ -124,7 +123,6 @@ enum class Message {
|
||||
StyleGetFont = 2486,
|
||||
StyleGetEOLFilled = 2487,
|
||||
StyleGetUnderline = 2488,
|
||||
StyleGetStrike = 6002,
|
||||
StyleGetCase = 2489,
|
||||
StyleGetCharacterSet = 2490,
|
||||
StyleGetVisible = 2491,
|
||||
|
||||
@ -286,7 +286,6 @@ enum class FindOption {
|
||||
None = 0x0,
|
||||
WholeWord = 0x2,
|
||||
MatchCase = 0x4,
|
||||
DotMatchAll = 0x1000,
|
||||
WordStart = 0x00100000,
|
||||
RegExp = 0x00200000,
|
||||
Posix = 0x00400000,
|
||||
@ -715,9 +714,7 @@ constexpr int MaskFolders = 0xFE000000;
|
||||
constexpr int MaxMargin = 4;
|
||||
constexpr int FontSizeMultiplier = 100;
|
||||
constexpr int TimeForever = 10000000;
|
||||
constexpr int MinZoomLevel = 10;
|
||||
constexpr int MaxZoomLevel = 1000;
|
||||
constexpr int KeywordsetMax = 15;
|
||||
constexpr int KeywordsetMax = 8;
|
||||
|
||||
//--Autogenerated -- end of section automatically generated from Scintilla.iface
|
||||
|
||||
|
||||
@ -239,12 +239,10 @@ void AutoComplete::Move(int delta) {
|
||||
const int count = lb->Length();
|
||||
int current = lb->GetSelection();
|
||||
current += delta;
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
if (current >= count)
|
||||
current = (current == count ? 0 : count - 1);
|
||||
current = count - 1;
|
||||
if (current < 0)
|
||||
current = (current == -1 ? count - 1 : 0);
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
current = 0;
|
||||
lb->Select(current);
|
||||
}
|
||||
|
||||
|
||||
@ -40,15 +40,9 @@ size_t Chunk::Length() const noexcept {
|
||||
|
||||
namespace {
|
||||
|
||||
#ifdef __APPLE__
|
||||
// Archaic macOS colours for the default: black on light yellow
|
||||
constexpr ColourRGBA colourTextAndArrow(black);
|
||||
constexpr ColourRGBA colourBackground(0xff, 0xff, 0xc6);
|
||||
#else
|
||||
// Grey on white
|
||||
constexpr ColourRGBA colourTextAndArrow(0x80, 0x80, 0x80);
|
||||
constexpr ColourRGBA colourBackground(white);
|
||||
#endif
|
||||
|
||||
constexpr ColourRGBA silver(0xc0, 0xc0, 0xc0);
|
||||
|
||||
|
||||
@ -84,6 +84,7 @@ constexpr int symmetricCaseConversionRanges[] = {
|
||||
66979,66940,15,1,
|
||||
66995,66956,7,1,
|
||||
68800,68736,51,1,
|
||||
68976,68944,22,1,
|
||||
71872,71840,32,1,
|
||||
93792,93760,32,1,
|
||||
125218,125184,34,1,
|
||||
@ -114,6 +115,7 @@ constexpr int symmetricCaseConversions[] = {
|
||||
405,502,
|
||||
409,408,
|
||||
410,573,
|
||||
411,42972,
|
||||
414,544,
|
||||
417,416,
|
||||
419,418,
|
||||
@ -149,6 +151,7 @@ constexpr int symmetricCaseConversions[] = {
|
||||
608,403,
|
||||
609,42924,
|
||||
611,404,
|
||||
612,42955,
|
||||
613,42893,
|
||||
614,42922,
|
||||
616,407,
|
||||
@ -195,6 +198,7 @@ constexpr int symmetricCaseConversions[] = {
|
||||
4349,7357,
|
||||
4350,7358,
|
||||
4351,7359,
|
||||
7306,7305,
|
||||
7545,42877,
|
||||
7549,11363,
|
||||
7566,42950,
|
||||
@ -246,9 +250,11 @@ constexpr int symmetricCaseConversions[] = {
|
||||
42900,42948,
|
||||
42952,42951,
|
||||
42954,42953,
|
||||
42957,42956,
|
||||
42961,42960,
|
||||
42967,42966,
|
||||
42969,42968,
|
||||
42971,42970,
|
||||
42998,42997,
|
||||
43859,42931,
|
||||
67003,66964,
|
||||
|
||||
@ -21,14 +21,12 @@
|
||||
#include <optional>
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
|
||||
#include "ScintillaTypes.h"
|
||||
|
||||
#include "Debugging.h"
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
#include "Scintilla.h"
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
#include "Position.h"
|
||||
#include "SplitVector.h"
|
||||
#include "Partitioning.h"
|
||||
@ -218,7 +216,7 @@ public:
|
||||
}
|
||||
void InsertLines(Sci::Line line, const Sci::Position *positions, size_t lines, bool lineStart) override {
|
||||
const POS lineAsPos = pos_cast(line);
|
||||
if constexpr (sizeof(Sci::Position) == sizeof(POS)) {
|
||||
if constexpr (std::is_convertible_v<Sci::Position *, POS *>) {
|
||||
starts.InsertPartitions(lineAsPos, positions, lines);
|
||||
} else {
|
||||
starts.InsertPartitionsWithCast(lineAsPos, positions, lines);
|
||||
|
||||
@ -8,10 +8,6 @@
|
||||
#ifndef CELLBUFFER_H
|
||||
#define CELLBUFFER_H
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
#include "Position.h"
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
|
||||
namespace Scintilla::Internal {
|
||||
|
||||
// Interface to per-line data that wants to see each line insertion and deletion
|
||||
|
||||
@ -15,11 +15,11 @@
|
||||
|
||||
using namespace Scintilla::Internal;
|
||||
|
||||
CharClassify::CharClassify() noexcept : charClass{} {
|
||||
CharClassify::CharClassify() : charClass{} {
|
||||
SetDefaultCharClasses(true);
|
||||
}
|
||||
|
||||
void CharClassify::SetDefaultCharClasses(bool includeWordClass) noexcept {
|
||||
void CharClassify::SetDefaultCharClasses(bool includeWordClass) {
|
||||
// Initialize all char classes to default values
|
||||
for (int ch = 0; ch < maxChar; ch++) {
|
||||
if (ch == '\r' || ch == '\n')
|
||||
@ -33,7 +33,7 @@ void CharClassify::SetDefaultCharClasses(bool includeWordClass) noexcept {
|
||||
}
|
||||
}
|
||||
|
||||
void CharClassify::SetCharClasses(const unsigned char *chars, CharacterClass newCharClass) noexcept {
|
||||
void CharClassify::SetCharClasses(const unsigned char *chars, CharacterClass newCharClass) {
|
||||
// Apply the newCharClass to the specified chars
|
||||
if (chars) {
|
||||
while (*chars) {
|
||||
|
||||
@ -14,10 +14,10 @@ enum class CharacterClass : unsigned char { space, newLine, word, punctuation };
|
||||
|
||||
class CharClassify {
|
||||
public:
|
||||
CharClassify() noexcept;
|
||||
CharClassify();
|
||||
|
||||
void SetDefaultCharClasses(bool includeWordClass) noexcept;
|
||||
void SetCharClasses(const unsigned char *chars, CharacterClass newCharClass) noexcept;
|
||||
void SetDefaultCharClasses(bool includeWordClass);
|
||||
void SetCharClasses(const unsigned char *chars, CharacterClass newCharClass);
|
||||
int GetCharsOfClass(CharacterClass characterClass, unsigned char *buffer) const noexcept;
|
||||
CharacterClass GetClass(unsigned char ch) const noexcept { return charClass[ch];}
|
||||
bool IsWord(unsigned char ch) const noexcept { return charClass[ch] == CharacterClass::word;}
|
||||
|
||||
@ -22,7 +22,7 @@ namespace {
|
||||
|
||||
const int catRanges[] = {
|
||||
//++Autogenerated -- start of section automatically generated
|
||||
// Created with Python 3.13.0, Unicode 15.1.0
|
||||
// Created with Python 3.14.0, Unicode 16.0.0
|
||||
25,
|
||||
1046,
|
||||
1073,
|
||||
@ -756,7 +756,7 @@ const int catRanges[] = {
|
||||
70141,
|
||||
70170,
|
||||
70237,
|
||||
70405,
|
||||
70373,
|
||||
70660,
|
||||
71971,
|
||||
72005,
|
||||
@ -1427,13 +1427,13 @@ const int catRanges[] = {
|
||||
223334,
|
||||
223396,
|
||||
223677,
|
||||
223697,
|
||||
223752,
|
||||
224081,
|
||||
224309,
|
||||
224613,
|
||||
224917,
|
||||
225201,
|
||||
225277,
|
||||
225285,
|
||||
225350,
|
||||
225380,
|
||||
@ -1471,7 +1471,9 @@ const int catRanges[] = {
|
||||
233219,
|
||||
233425,
|
||||
233473,
|
||||
233789,
|
||||
233760,
|
||||
233793,
|
||||
233853,
|
||||
233984,
|
||||
235389,
|
||||
235424,
|
||||
@ -1950,7 +1952,7 @@ const int catRanges[] = {
|
||||
292501,
|
||||
293778,
|
||||
293973,
|
||||
296189,
|
||||
296285,
|
||||
296981,
|
||||
297341,
|
||||
297994,
|
||||
@ -2319,7 +2321,7 @@ const int catRanges[] = {
|
||||
406229,
|
||||
406532,
|
||||
407573,
|
||||
408733,
|
||||
408797,
|
||||
409077,
|
||||
409092,
|
||||
409621,
|
||||
@ -2588,7 +2590,9 @@ const int catRanges[] = {
|
||||
1374465,
|
||||
1374496,
|
||||
1374529,
|
||||
1374589,
|
||||
1374560,
|
||||
1374625,
|
||||
1374685,
|
||||
1374720,
|
||||
1374753,
|
||||
1374813,
|
||||
@ -2599,7 +2603,10 @@ const int catRanges[] = {
|
||||
1374945,
|
||||
1374976,
|
||||
1375009,
|
||||
1375069,
|
||||
1375040,
|
||||
1375073,
|
||||
1375104,
|
||||
1375165,
|
||||
1375811,
|
||||
1375904,
|
||||
1375937,
|
||||
@ -3005,6 +3012,8 @@ const int catRanges[] = {
|
||||
2144093,
|
||||
2144097,
|
||||
2144189,
|
||||
2144260,
|
||||
2145949,
|
||||
2146308,
|
||||
2156285,
|
||||
2156548,
|
||||
@ -3118,6 +3127,19 @@ const int catRanges[] = {
|
||||
2204957,
|
||||
2205192,
|
||||
2205533,
|
||||
2205704,
|
||||
2206020,
|
||||
2206147,
|
||||
2206180,
|
||||
2206208,
|
||||
2206941,
|
||||
2207013,
|
||||
2207180,
|
||||
2207203,
|
||||
2207233,
|
||||
2207965,
|
||||
2208210,
|
||||
2208285,
|
||||
2214922,
|
||||
2215933,
|
||||
2215940,
|
||||
@ -3127,7 +3149,9 @@ const int catRanges[] = {
|
||||
2217437,
|
||||
2217476,
|
||||
2217565,
|
||||
2219941,
|
||||
2218052,
|
||||
2218173,
|
||||
2219909,
|
||||
2220036,
|
||||
2220970,
|
||||
2221284,
|
||||
@ -3283,6 +3307,37 @@ const int catRanges[] = {
|
||||
2256317,
|
||||
2256389,
|
||||
2256573,
|
||||
2256900,
|
||||
2257245,
|
||||
2257252,
|
||||
2257309,
|
||||
2257348,
|
||||
2257405,
|
||||
2257412,
|
||||
2258653,
|
||||
2258660,
|
||||
2258694,
|
||||
2258789,
|
||||
2259005,
|
||||
2259014,
|
||||
2259069,
|
||||
2259110,
|
||||
2259165,
|
||||
2259174,
|
||||
2259325,
|
||||
2259334,
|
||||
2259397,
|
||||
2259430,
|
||||
2259461,
|
||||
2259492,
|
||||
2259525,
|
||||
2259556,
|
||||
2259601,
|
||||
2259677,
|
||||
2259697,
|
||||
2259773,
|
||||
2260005,
|
||||
2260093,
|
||||
2260996,
|
||||
2262694,
|
||||
2262789,
|
||||
@ -3353,9 +3408,13 @@ const int catRanges[] = {
|
||||
2283357,
|
||||
2283528,
|
||||
2283869,
|
||||
2284040,
|
||||
2284701,
|
||||
2285572,
|
||||
2286461,
|
||||
2286501,
|
||||
2286534,
|
||||
2286565,
|
||||
2286598,
|
||||
2286661,
|
||||
2286790,
|
||||
@ -3444,6 +3503,11 @@ const int catRanges[] = {
|
||||
2318141,
|
||||
2318353,
|
||||
2318685,
|
||||
2324484,
|
||||
2325553,
|
||||
2325597,
|
||||
2326024,
|
||||
2326365,
|
||||
2326532,
|
||||
2326845,
|
||||
2326852,
|
||||
@ -3525,7 +3589,8 @@ const int catRanges[] = {
|
||||
2353221,
|
||||
2353265,
|
||||
2353672,
|
||||
2354013,
|
||||
2353989,
|
||||
2354045,
|
||||
2356740,
|
||||
2356797,
|
||||
2357258,
|
||||
@ -3551,8 +3616,16 @@ const int catRanges[] = {
|
||||
2525220,
|
||||
2525413,
|
||||
2525917,
|
||||
2526212,
|
||||
2654077,
|
||||
2654212,
|
||||
2672893,
|
||||
2891780,
|
||||
2892741,
|
||||
2893126,
|
||||
2893221,
|
||||
2893320,
|
||||
2893661,
|
||||
2949124,
|
||||
2967357,
|
||||
2967556,
|
||||
@ -3585,6 +3658,12 @@ const int catRanges[] = {
|
||||
2977565,
|
||||
2977700,
|
||||
2978333,
|
||||
2992131,
|
||||
2992228,
|
||||
2993507,
|
||||
2993585,
|
||||
2993672,
|
||||
2994013,
|
||||
3000320,
|
||||
3001345,
|
||||
3002378,
|
||||
@ -3610,7 +3689,7 @@ const int catRanges[] = {
|
||||
3211037,
|
||||
3211268,
|
||||
3250909,
|
||||
3252228,
|
||||
3252196,
|
||||
3252541,
|
||||
3538435,
|
||||
3538589,
|
||||
@ -3643,6 +3722,11 @@ const int catRanges[] = {
|
||||
3642353,
|
||||
3642394,
|
||||
3642525,
|
||||
3768341,
|
||||
3776008,
|
||||
3776349,
|
||||
3776533,
|
||||
3790493,
|
||||
3792901,
|
||||
3794397,
|
||||
3794437,
|
||||
@ -3827,6 +3911,13 @@ const int catRanges[] = {
|
||||
3972485,
|
||||
3972616,
|
||||
3972957,
|
||||
3979780,
|
||||
3980741,
|
||||
3980804,
|
||||
3980840,
|
||||
3981181,
|
||||
3981297,
|
||||
3981341,
|
||||
3996676,
|
||||
3996925,
|
||||
3996932,
|
||||
@ -3979,7 +4070,9 @@ const int catRanges[] = {
|
||||
4133397,
|
||||
4134365,
|
||||
4134421,
|
||||
4134493,
|
||||
4134813,
|
||||
4134933,
|
||||
4135005,
|
||||
4136981,
|
||||
4147869,
|
||||
4148245,
|
||||
@ -3987,21 +4080,18 @@ const int catRanges[] = {
|
||||
4148757,
|
||||
4149181,
|
||||
4149269,
|
||||
4149565,
|
||||
4149781,
|
||||
4151261,
|
||||
4151285,
|
||||
4151517,
|
||||
4149597,
|
||||
4149749,
|
||||
4151549,
|
||||
4151765,
|
||||
4152221,
|
||||
4152341,
|
||||
4152637,
|
||||
4152253,
|
||||
4152309,
|
||||
4152669,
|
||||
4152853,
|
||||
4153149,
|
||||
4153365,
|
||||
4158077,
|
||||
4158101,
|
||||
4159869,
|
||||
4161032,
|
||||
4161373,
|
||||
4194308,
|
||||
|
||||
@ -198,7 +198,7 @@ int SCI_METHOD Document::AddRef() noexcept {
|
||||
|
||||
// Decrease reference count and return its previous value.
|
||||
// Delete the document if reference count reaches zero.
|
||||
int SCI_METHOD Document::Release() noexcept{
|
||||
int SCI_METHOD Document::Release() {
|
||||
const int curRefCount = --refCount;
|
||||
if (curRefCount == 0)
|
||||
delete this;
|
||||
@ -503,7 +503,7 @@ int Document::MarkerHandleFromLine(Sci::Line line, int which) const noexcept {
|
||||
return Markers()->HandleFromLine(line, which);
|
||||
}
|
||||
|
||||
Sci_Position SCI_METHOD Document::LineStart(Sci_Position line) const noexcept {
|
||||
Sci_Position SCI_METHOD Document::LineStart(Sci_Position line) const {
|
||||
return cb.LineStart(line);
|
||||
}
|
||||
|
||||
@ -523,14 +523,14 @@ int SCI_METHOD Document::DEVersion() const noexcept {
|
||||
return deRelease0;
|
||||
}
|
||||
|
||||
void SCI_METHOD Document::SetErrorStatus(int status) noexcept {
|
||||
void SCI_METHOD Document::SetErrorStatus(int status) {
|
||||
// Tell the watchers an error has occurred.
|
||||
for (const WatcherWithUserData &watcher : watchers) {
|
||||
watcher.watcher->NotifyErrorOccurred(this, watcher.userData, static_cast<Status>(status));
|
||||
}
|
||||
}
|
||||
|
||||
Sci_Position SCI_METHOD Document::LineFromPosition(Sci_Position pos) const noexcept {
|
||||
Sci_Position SCI_METHOD Document::LineFromPosition(Sci_Position pos) const {
|
||||
return cb.LineFromPosition(pos);
|
||||
}
|
||||
|
||||
@ -602,7 +602,7 @@ int SCI_METHOD Document::SetLevel(Sci_Position line, int level) {
|
||||
return prev;
|
||||
}
|
||||
|
||||
int SCI_METHOD Document::GetLevel(Sci_Position line) const noexcept {
|
||||
int SCI_METHOD Document::GetLevel(Sci_Position line) const {
|
||||
return Levels()->GetLevel(line);
|
||||
}
|
||||
|
||||
@ -1016,7 +1016,7 @@ CharacterExtracted Document::CharacterBefore(Sci::Position position) const noexc
|
||||
}
|
||||
|
||||
// Return -1 on out-of-bounds
|
||||
Sci_Position SCI_METHOD Document::GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const noexcept {
|
||||
Sci_Position SCI_METHOD Document::GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const {
|
||||
Sci::Position pos = positionStart;
|
||||
if (dbcsCodePage) {
|
||||
const int increment = (characterOffset > 0) ? 1 : -1;
|
||||
@ -1056,7 +1056,7 @@ Sci::Position Document::GetRelativePositionUTF16(Sci::Position positionStart, Sc
|
||||
return pos;
|
||||
}
|
||||
|
||||
int SCI_METHOD Document::GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const noexcept {
|
||||
int SCI_METHOD Document::GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const {
|
||||
int bytesInCharacter = 1;
|
||||
const unsigned char leadByte = cb.UCharAt(position);
|
||||
int character = leadByte;
|
||||
@ -1090,11 +1090,11 @@ int SCI_METHOD Document::GetCharacterAndWidth(Sci_Position position, Sci_Positio
|
||||
return character;
|
||||
}
|
||||
|
||||
int SCI_METHOD Document::CodePage() const noexcept {
|
||||
int SCI_METHOD Document::CodePage() const {
|
||||
return dbcsCodePage;
|
||||
}
|
||||
|
||||
bool SCI_METHOD Document::IsDBCSLeadByte(char ch) const noexcept {
|
||||
bool SCI_METHOD Document::IsDBCSLeadByte(char ch) const {
|
||||
// Used by lexers so must match IDocument method exactly
|
||||
return IsDBCSLeadByteNoExcept(ch);
|
||||
}
|
||||
@ -1559,7 +1559,7 @@ IDocumentEditable *Document::AsDocumentEditable() noexcept {
|
||||
return static_cast<IDocumentEditable *>(this);
|
||||
}
|
||||
|
||||
void * SCI_METHOD Document::ConvertToDocument() noexcept {
|
||||
void *SCI_METHOD Document::ConvertToDocument() {
|
||||
return AsDocumentEditable();
|
||||
}
|
||||
|
||||
@ -2555,7 +2555,7 @@ int Document::CharacterCategoryOptimization() const noexcept {
|
||||
return charMap.Size();
|
||||
}
|
||||
|
||||
void SCI_METHOD Document::StartStyling(Sci_Position position) noexcept {
|
||||
void SCI_METHOD Document::StartStyling(Sci_Position position) {
|
||||
endStyled = position;
|
||||
}
|
||||
|
||||
@ -2669,7 +2669,7 @@ int SCI_METHOD Document::SetLineState(Sci_Position line, int state) {
|
||||
return statePrevious;
|
||||
}
|
||||
|
||||
int SCI_METHOD Document::GetLineState(Sci_Position line) const noexcept {
|
||||
int SCI_METHOD Document::GetLineState(Sci_Position line) const {
|
||||
return States()->GetLineState(line);
|
||||
}
|
||||
|
||||
@ -2803,7 +2803,7 @@ void Document::IncrementStyleClock() noexcept {
|
||||
styleClock = (styleClock + 1) % 0x100000;
|
||||
}
|
||||
|
||||
void SCI_METHOD Document::DecorationSetCurrentIndicator(int indicator) noexcept {
|
||||
void SCI_METHOD Document::DecorationSetCurrentIndicator(int indicator) {
|
||||
decorations->SetCurrentIndicator(indicator);
|
||||
}
|
||||
|
||||
|
||||
@ -8,14 +8,6 @@
|
||||
#ifndef DOCUMENT_H
|
||||
#define DOCUMENT_H
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
#if defined(__cplusplus)
|
||||
#include <map>
|
||||
#else
|
||||
#endif
|
||||
#include "ILoader.h"
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
|
||||
namespace Scintilla::Internal {
|
||||
|
||||
class DocWatcher;
|
||||
@ -357,7 +349,7 @@ public:
|
||||
~Document() override;
|
||||
|
||||
int SCI_METHOD AddRef() noexcept override;
|
||||
int SCI_METHOD Release() noexcept override;
|
||||
int SCI_METHOD Release() override;
|
||||
|
||||
// From PerLine
|
||||
void Init() override;
|
||||
@ -371,14 +363,14 @@ public:
|
||||
bool SetLineEndTypesAllowed(Scintilla::LineEndType lineEndBitSet_);
|
||||
Scintilla::LineEndType GetLineEndTypesActive() const noexcept { return cb.GetLineEndTypes(); }
|
||||
|
||||
int SCI_METHOD Version() const noexcept override {
|
||||
int SCI_METHOD Version() const override {
|
||||
return Scintilla::dvRelease4;
|
||||
}
|
||||
int SCI_METHOD DEVersion() const noexcept override;
|
||||
|
||||
void SCI_METHOD SetErrorStatus(int status) noexcept override;
|
||||
void SCI_METHOD SetErrorStatus(int status) override;
|
||||
|
||||
Sci_Position SCI_METHOD LineFromPosition(Sci_Position pos) const noexcept override;
|
||||
Sci_Position SCI_METHOD LineFromPosition(Sci_Position pos) const override;
|
||||
Sci::Line SciLineFromPosition(Sci::Position pos) const noexcept; // Avoids casting LineFromPosition
|
||||
Sci::Position ClampPositionIntoDocument(Sci::Position pos) const noexcept;
|
||||
bool ContainsLineEnd(const char *s, Sci::Position length) const noexcept { return cb.ContainsLineEnd(s, length); }
|
||||
@ -390,11 +382,11 @@ public:
|
||||
bool NextCharacter(Sci::Position &pos, int moveDir) const noexcept; // Returns true if pos changed
|
||||
CharacterExtracted CharacterAfter(Sci::Position position) const noexcept;
|
||||
CharacterExtracted CharacterBefore(Sci::Position position) const noexcept;
|
||||
Sci_Position SCI_METHOD GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const noexcept override;
|
||||
Sci_Position SCI_METHOD GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const override;
|
||||
Sci::Position GetRelativePositionUTF16(Sci::Position positionStart, Sci::Position characterOffset) const noexcept;
|
||||
int SCI_METHOD GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const noexcept override;
|
||||
int SCI_METHOD CodePage() const noexcept override;
|
||||
bool SCI_METHOD IsDBCSLeadByte(char ch) const noexcept override;
|
||||
int SCI_METHOD GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const override;
|
||||
int SCI_METHOD CodePage() const override;
|
||||
bool SCI_METHOD IsDBCSLeadByte(char ch) const override;
|
||||
bool IsDBCSLeadByteNoExcept(char ch) const noexcept;
|
||||
bool IsDBCSTrailByteNoExcept(char ch) const noexcept;
|
||||
unsigned char DBCSMinTrailByte() const noexcept;
|
||||
@ -413,7 +405,7 @@ public:
|
||||
void ChangeInsertion(const char *s, Sci::Position length);
|
||||
int SCI_METHOD AddData(const char *data, Sci_Position length) override;
|
||||
IDocumentEditable *AsDocumentEditable() noexcept;
|
||||
void * SCI_METHOD ConvertToDocument() noexcept override;
|
||||
void *SCI_METHOD ConvertToDocument() override;
|
||||
Sci::Position Undo();
|
||||
Sci::Position Redo();
|
||||
bool CanUndo() const noexcept { return cb.CanUndo(); }
|
||||
@ -481,7 +473,7 @@ public:
|
||||
void DelCharBack(Sci::Position pos);
|
||||
|
||||
char CharAt(Sci::Position position) const noexcept { return cb.CharAt(position); }
|
||||
void SCI_METHOD GetCharRange(char *buffer, Sci_Position position, Sci_Position lengthRetrieve) const noexcept override {
|
||||
void SCI_METHOD GetCharRange(char *buffer, Sci_Position position, Sci_Position lengthRetrieve) const override {
|
||||
cb.GetCharRange(buffer, position, lengthRetrieve);
|
||||
}
|
||||
char SCI_METHOD StyleAt(Sci_Position position) const override { return cb.StyleAt(position); }
|
||||
@ -500,7 +492,7 @@ public:
|
||||
Sci::Line LineFromHandle(int markerHandle) const noexcept;
|
||||
int MarkerNumberFromLine(Sci::Line line, int which) const noexcept;
|
||||
int MarkerHandleFromLine(Sci::Line line, int which) const noexcept;
|
||||
Sci_Position SCI_METHOD LineStart(Sci_Position line) const noexcept override;
|
||||
Sci_Position SCI_METHOD LineStart(Sci_Position line) const override;
|
||||
[[nodiscard]] Range LineRange(Sci::Line line) const noexcept;
|
||||
bool IsLineStartPosition(Sci::Position position) const noexcept;
|
||||
Sci_Position SCI_METHOD LineEnd(Sci_Position line) const override;
|
||||
@ -514,7 +506,7 @@ public:
|
||||
Sci::Line LineFromPositionAfter(Sci::Line line, Sci::Position length) const noexcept;
|
||||
|
||||
int SCI_METHOD SetLevel(Sci_Position line, int level) override;
|
||||
int SCI_METHOD GetLevel(Sci_Position line) const noexcept override;
|
||||
int SCI_METHOD GetLevel(Sci_Position line) const override;
|
||||
Scintilla::FoldLevel GetFoldLevel(Sci_Position line) const noexcept;
|
||||
void ClearLevels();
|
||||
Sci::Line GetLastChild(Sci::Line lineParent, std::optional<Scintilla::FoldLevel> level = {}, Sci::Line lastLine = -1);
|
||||
@ -524,7 +516,7 @@ public:
|
||||
Sci::Position ExtendWordSelect(Sci::Position pos, int delta, bool onlyWordCharacters=false) const;
|
||||
Sci::Position NextWordStart(Sci::Position pos, int delta) const;
|
||||
Sci::Position NextWordEnd(Sci::Position pos, int delta) const;
|
||||
Sci_Position SCI_METHOD Length() const noexcept override { return cb.Length(); }
|
||||
Sci_Position SCI_METHOD Length() const override { return cb.Length(); }
|
||||
Sci::Position LengthNoExcept() const noexcept { return cb.Length(); }
|
||||
void Allocate(Sci::Position newSize) { cb.Allocate(newSize); }
|
||||
|
||||
@ -550,7 +542,7 @@ public:
|
||||
int GetCharsOfClass(CharacterClass characterClass, unsigned char *buffer) const;
|
||||
void SetCharacterCategoryOptimization(int countCharacters);
|
||||
int CharacterCategoryOptimization() const noexcept;
|
||||
void SCI_METHOD StartStyling(Sci_Position position) noexcept override;
|
||||
void SCI_METHOD StartStyling(Sci_Position position) override;
|
||||
bool SCI_METHOD SetStyleFor(Sci_Position length, char style) override;
|
||||
bool SCI_METHOD SetStyles(Sci_Position length, const char *styles) override;
|
||||
Sci::Position GetEndStyled() const noexcept { return endStyled; }
|
||||
@ -558,7 +550,7 @@ public:
|
||||
void StyleToAdjustingLineDuration(Sci::Position pos);
|
||||
int GetStyleClock() const noexcept { return styleClock; }
|
||||
void IncrementStyleClock() noexcept;
|
||||
void SCI_METHOD DecorationSetCurrentIndicator(int indicator) noexcept override;
|
||||
void SCI_METHOD DecorationSetCurrentIndicator(int indicator) override;
|
||||
void SCI_METHOD DecorationFillRange(Sci_Position position, int value, Sci_Position fillLength) override;
|
||||
LexInterface *GetLexInterface() const noexcept;
|
||||
void SetLexInterface(std::unique_ptr<LexInterface> pLexInterface) noexcept;
|
||||
@ -568,7 +560,7 @@ public:
|
||||
void TruncateUndoComments(int action);
|
||||
|
||||
int SCI_METHOD SetLineState(Sci_Position line, int state) override;
|
||||
int SCI_METHOD GetLineState(Sci_Position line) const noexcept override;
|
||||
int SCI_METHOD GetLineState(Sci_Position line) const override;
|
||||
Sci::Line GetMaxLineState() const noexcept;
|
||||
void SCI_METHOD ChangeLexerState(Sci_Position start, Sci_Position end) override;
|
||||
|
||||
|
||||
@ -70,9 +70,7 @@ using namespace Scintilla;
|
||||
using namespace Scintilla::Internal;
|
||||
|
||||
PrintParameters::PrintParameters() noexcept {
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
magnification = 100;
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
magnification = 0;
|
||||
colourMode = PrintOption::Normal;
|
||||
wrapState = Wrap::Word;
|
||||
}
|
||||
@ -604,7 +602,7 @@ void EditView::LayoutLine(const EditModel &model, Surface *surface, const ViewSt
|
||||
// Fill the LineLayout bidirectional data fields according to each char style
|
||||
|
||||
void EditView::UpdateBidiData(const EditModel &model, const ViewStyle &vstyle, LineLayout *ll) {
|
||||
if (model.BidirectionalEnabled()) {
|
||||
if (model.BidirectionalEnabled() && (ll->numCharsInLine >= 0)) {
|
||||
ll->EnsureBidiData();
|
||||
for (int stylesInLine = 0; stylesInLine < ll->numCharsInLine; stylesInLine++) {
|
||||
ll->bidiData->stylesFonts[stylesInLine] = vstyle.styles[ll->styles[stylesInLine]].font;
|
||||
@ -2322,14 +2320,6 @@ void EditView::DrawForeground(Surface *surface, const EditModel &model, const Vi
|
||||
}
|
||||
surface->FillRectangleAligned(rcUL, colourUnderline);
|
||||
}
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
else if (vsDraw.styles[styleMain].strike) {
|
||||
PRectangle rcUL = rcSegment;
|
||||
rcUL.top = rcUL.top + std::ceil((rcUL.bottom - rcUL.top) / 2);
|
||||
rcUL.bottom = rcUL.top + 1;
|
||||
surface->FillRectangleAligned(rcUL, Fill(textFore));
|
||||
}
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
} else if (horizontal.left > rcLine.right) {
|
||||
break;
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
namespace Scintilla::Internal {
|
||||
|
||||
struct PrintParameters {
|
||||
int magnification; /// @ 2018-09-06 Changed to a percent value
|
||||
int magnification;
|
||||
Scintilla::PrintOption colourMode;
|
||||
Scintilla::Wrap wrapState;
|
||||
PrintParameters() noexcept;
|
||||
|
||||
@ -13,9 +13,6 @@
|
||||
#include <cstdio>
|
||||
#include <cmath>
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
#include <ranges>
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
@ -718,7 +715,7 @@ void Editor::SetSelectionFromSerialized(const char *serialized) {
|
||||
sel = Selection(serialized);
|
||||
sel.Truncate(pdoc->Length());
|
||||
SetRectangularRange();
|
||||
InvalidateStyleRedraw();
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
@ -2437,6 +2434,7 @@ void Editor::RestoreSelection(Sci::Position newPos, UndoRedo history) {
|
||||
}
|
||||
}
|
||||
newPos = -1; // Used selection from stack so don't use position returned from undo/redo.
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
if (newPos >= 0)
|
||||
@ -4066,22 +4064,20 @@ int Editor::KeyCommand(Message iMessage) {
|
||||
case Message::FormFeed:
|
||||
AddChar('\f');
|
||||
break;
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
case Message::ZoomIn:
|
||||
if (vs.ZoomIn()) {
|
||||
//vs.zoomLevel++;
|
||||
if (vs.zoomLevel < 60) {
|
||||
vs.zoomLevel++;
|
||||
InvalidateStyleRedraw();
|
||||
NotifyZoom();
|
||||
}
|
||||
break;
|
||||
case Message::ZoomOut:
|
||||
if (vs.ZoomOut()) {
|
||||
//vs.zoomLevel--;
|
||||
if (vs.zoomLevel > -10) {
|
||||
vs.zoomLevel--;
|
||||
InvalidateStyleRedraw();
|
||||
NotifyZoom();
|
||||
}
|
||||
break;
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
|
||||
case Message::DelWordLeft:
|
||||
case Message::DelWordRight:
|
||||
@ -4159,6 +4155,12 @@ int Editor::KeyDownWithModifiers(Keys key, KeyMod modifiers, bool *consumed) {
|
||||
|
||||
void Editor::Indent(bool forwards, bool lineIndent) {
|
||||
UndoGroup ug(pdoc);
|
||||
// Avoid problems with recalculating rectangular range multiple times by temporarily
|
||||
// treating rectangular selection as multiple stream selection.
|
||||
const Selection::SelTypes selType = sel.selType;
|
||||
if (sel.IsRectangular()) {
|
||||
sel.selType = Selection::SelTypes::stream;
|
||||
}
|
||||
for (size_t r=0; r<sel.Count(); r++) {
|
||||
const Sci::Line lineOfAnchor =
|
||||
pdoc->SciLineFromPosition(sel.Range(r).anchor.Position());
|
||||
@ -4235,6 +4237,8 @@ void Editor::Indent(bool forwards, bool lineIndent) {
|
||||
}
|
||||
}
|
||||
}
|
||||
sel.selType = selType; // Restore rectangular mode
|
||||
ThinRectangularRange();
|
||||
ContainerNeedsUpdate(Update::Selection);
|
||||
}
|
||||
|
||||
@ -4496,14 +4500,10 @@ void Editor::SetDragPosition(SelectionPosition newPos) {
|
||||
posDrop = newPos;
|
||||
}
|
||||
if (!(posDrag == newPos)) {
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
int const slop_x = (caretPolicies.x.slop < 50) ? 50 : caretPolicies.x.slop;
|
||||
int const slop_y = (caretPolicies.y.slop < 2) ? 2 : caretPolicies.y.slop;
|
||||
const CaretPolicies dragCaretPolicies = {
|
||||
CaretPolicySlop(CaretPolicy::Slop | CaretPolicy::Strict | CaretPolicy::Even, slop_x),
|
||||
CaretPolicySlop(CaretPolicy::Slop | CaretPolicy::Strict | CaretPolicy::Even, slop_y)
|
||||
CaretPolicySlop(CaretPolicy::Slop | CaretPolicy::Strict | CaretPolicy::Even, 50),
|
||||
CaretPolicySlop(CaretPolicy::Slop | CaretPolicy::Strict | CaretPolicy::Even, 2)
|
||||
};
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
MovedCaret(newPos, posDrag, true, dragCaretPolicies);
|
||||
|
||||
caret.on = true;
|
||||
@ -4523,7 +4523,7 @@ void Editor::DisplayCursor(Window::Cursor c) {
|
||||
wMain.SetCursor(static_cast<Window::Cursor>(cursorMode));
|
||||
}
|
||||
|
||||
bool Editor::DragThreshold(Point ptStart, Point ptNow) noexcept {
|
||||
bool Editor::DragThreshold(Point ptStart, Point ptNow) {
|
||||
const Point ptDiff = ptStart - ptNow;
|
||||
const XYPOSITION distanceSquared = ptDiff.x * ptDiff.x + ptDiff.y * ptDiff.y;
|
||||
return distanceSquared > 16.0f;
|
||||
@ -4590,9 +4590,6 @@ void Editor::DropAt(SelectionPosition position, const char *value, size_t length
|
||||
SetSelection(posAfterInsertion, position);
|
||||
}
|
||||
}
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
EnsureCaretVisible();
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
} else if (inDragDrop == DragDrop::dragging) {
|
||||
SetEmptySelection(position);
|
||||
}
|
||||
@ -4996,9 +4993,6 @@ void Editor::SetHoverIndicatorPosition(Sci::Position position) {
|
||||
}
|
||||
}
|
||||
if (hoverIndicatorPosPrev != hoverIndicatorPos) {
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
TickFor(TickReason::dwell); // trigger SCN_DWELLSTART
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
@ -5155,13 +5149,7 @@ void Editor::ButtonMoveWithModifiers(Point pt, unsigned int, KeyMod modifiers) {
|
||||
SetHotSpotRange(&pt);
|
||||
} else {
|
||||
if (hoverIndicatorPos != Sci::invalidPosition)
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
{
|
||||
const bool ctrl = FlagSet(modifiers, KeyMod::Ctrl);
|
||||
const bool alt = FlagSet(modifiers, KeyMod::Alt);
|
||||
DisplayCursor(ctrl ? Window::Cursor::hand : (alt ? Window::Cursor::arrow : Window::Cursor::text));
|
||||
}
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
DisplayCursor(Window::Cursor::hand);
|
||||
else
|
||||
DisplayCursor(Window::Cursor::text);
|
||||
SetHotSpotRange(nullptr);
|
||||
@ -5465,19 +5453,19 @@ void Editor::QueueIdleWork(WorkItems items, Sci::Position upTo) {
|
||||
workNeeded.Need(items, upTo);
|
||||
}
|
||||
|
||||
int Editor::SupportsFeature(Scintilla::Supports feature) const noexcept {
|
||||
int Editor::SupportsFeature(Supports feature) {
|
||||
AutoSurface surface(this);
|
||||
return surface->SupportsFeature(feature);
|
||||
}
|
||||
|
||||
bool Editor::PaintContains(PRectangle rc) const noexcept {
|
||||
bool Editor::PaintContains(PRectangle rc) {
|
||||
if (rc.Empty()) {
|
||||
return true;
|
||||
}
|
||||
return rcPaint.Contains(rc);
|
||||
}
|
||||
|
||||
bool Editor::PaintContainsMargin() const noexcept {
|
||||
bool Editor::PaintContainsMargin() {
|
||||
if (HasMarginWindow()) {
|
||||
// With separate margin view, paint of text view
|
||||
// never contains margin.
|
||||
@ -6083,12 +6071,6 @@ void Editor::StyleSetMessage(Message iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
case Message::StyleSetUnderline:
|
||||
vs.styles[wParam].underline = lParam != 0;
|
||||
break;
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
// Added strike style, 2020-05-31
|
||||
case Message::StyleSetStrike:
|
||||
vs.styles[wParam].strike = lParam != 0;
|
||||
break;
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
case Message::StyleSetCase:
|
||||
vs.styles[wParam].caseForce = static_cast<Style::CaseForce>(lParam);
|
||||
break;
|
||||
@ -6152,11 +6134,6 @@ sptr_t Editor::StyleGetMessage(Message iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
return StringResult(lParam, vs.styles[wParam].fontName);
|
||||
case Message::StyleGetUnderline:
|
||||
return vs.styles[wParam].underline ? 1 : 0;
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
// Added strike style, 2020-05-31
|
||||
case Message::StyleGetStrike:
|
||||
return vs.styles[wParam].strike ? 1 : 0;
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
case Message::StyleGetCase:
|
||||
return static_cast<int>(vs.styles[wParam].caseForce);
|
||||
case Message::StyleGetCharacterSet:
|
||||
@ -6927,9 +6904,7 @@ sptr_t Editor::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
break;
|
||||
|
||||
case Message::SetPrintMagnification:
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
view.printParameters.magnification = std::clamp(static_cast<int>(wParam), SC_MIN_ZOOM_LEVEL, SC_MAX_ZOOM_LEVEL);
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
view.printParameters.magnification = static_cast<int>(wParam);
|
||||
break;
|
||||
|
||||
case Message::GetPrintMagnification:
|
||||
@ -7187,7 +7162,6 @@ sptr_t Editor::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
|
||||
case Message::SetUseTabs:
|
||||
pdoc->useTabs = wParam != 0;
|
||||
InvalidateStyleRedraw();
|
||||
break;
|
||||
|
||||
case Message::GetUseTabs:
|
||||
@ -7721,9 +7695,6 @@ sptr_t Editor::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
case Message::StyleSetSizeFractional:
|
||||
case Message::StyleSetFont:
|
||||
case Message::StyleSetUnderline:
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
case Message::StyleSetStrike:
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
case Message::StyleSetCase:
|
||||
case Message::StyleSetCharacterSet:
|
||||
case Message::StyleSetVisible:
|
||||
@ -7745,9 +7716,6 @@ sptr_t Editor::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
case Message::StyleGetSizeFractional:
|
||||
case Message::StyleGetFont:
|
||||
case Message::StyleGetUnderline:
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
case Message::StyleGetStrike:
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
case Message::StyleGetCase:
|
||||
case Message::StyleGetCharacterSet:
|
||||
case Message::StyleGetVisible:
|
||||
@ -8406,15 +8374,11 @@ sptr_t Editor::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
InvalidateStyleRedraw();
|
||||
break;
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
case Message::SetZoom: {
|
||||
const int zoomLevel = std::clamp(static_cast<int>(wParam), SC_MIN_ZOOM_LEVEL, SC_MAX_ZOOM_LEVEL);
|
||||
if (SetAppearance(vs.zoomLevel, zoomLevel)) {
|
||||
case Message::SetZoom:
|
||||
if (SetAppearance(vs.zoomLevel, static_cast<int>(wParam))) {
|
||||
NotifyZoom();
|
||||
}
|
||||
}
|
||||
break;
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
break;
|
||||
|
||||
case Message::GetZoom:
|
||||
return vs.zoomLevel;
|
||||
|
||||
@ -69,17 +69,13 @@ class SelectionText {
|
||||
public:
|
||||
bool rectangular;
|
||||
bool lineCopy;
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
bool asBinary;
|
||||
int codePage;
|
||||
Scintilla::CharacterSet characterSet;
|
||||
SelectionText() noexcept : rectangular(false), lineCopy(false), asBinary(false), codePage(0), characterSet(Scintilla::CharacterSet::Ansi) {}
|
||||
SelectionText() noexcept : rectangular(false), lineCopy(false), codePage(0), characterSet(Scintilla::CharacterSet::Ansi) {}
|
||||
void Clear() noexcept {
|
||||
s.clear();
|
||||
rectangular = false;
|
||||
lineCopy = false;
|
||||
asBinary = false;
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
codePage = 0;
|
||||
characterSet = Scintilla::CharacterSet::Ansi;
|
||||
}
|
||||
@ -466,7 +462,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
virtual void NotifyChange() = 0;
|
||||
virtual void NotifyFocus(bool focus);
|
||||
virtual void SetCtrlID(int identifier);
|
||||
virtual int GetCtrlID() const noexcept { return ctrlID; }
|
||||
virtual int GetCtrlID() { return ctrlID; }
|
||||
virtual void NotifyParent(Scintilla::NotificationData scn) = 0;
|
||||
virtual void NotifyStyleToNeeded(Sci::Position endStyleNeeded);
|
||||
void NotifyChar(int ch, Scintilla::CharacterSource charSource);
|
||||
@ -541,7 +537,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
void CopyText(size_t length, const char *text);
|
||||
void SetDragPosition(SelectionPosition newPos);
|
||||
virtual void DisplayCursor(Window::Cursor c);
|
||||
virtual bool DragThreshold(Point ptStart, Point ptNow) noexcept;
|
||||
virtual bool DragThreshold(Point ptStart, Point ptNow);
|
||||
virtual void StartDrag();
|
||||
void DropAt(SelectionPosition position, const char *value, size_t lengthValue, bool moving, bool rectangular);
|
||||
void DropAt(SelectionPosition position, const char *value, bool moving, bool rectangular);
|
||||
@ -587,9 +583,9 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
virtual void IdleWork();
|
||||
virtual void QueueIdleWork(WorkItems items, Sci::Position upTo=0);
|
||||
|
||||
virtual int SupportsFeature(Scintilla::Supports feature) const noexcept;
|
||||
virtual bool PaintContains(PRectangle rc) const noexcept;
|
||||
bool PaintContainsMargin() const noexcept;
|
||||
virtual int SupportsFeature(Scintilla::Supports feature);
|
||||
virtual bool PaintContains(PRectangle rc);
|
||||
bool PaintContainsMargin();
|
||||
void CheckForChangeOutsidePaint(Range r);
|
||||
void SetBraceHighlight(Sci::Position pos0, Sci::Position pos1, int matchStyle);
|
||||
|
||||
|
||||
@ -189,13 +189,13 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r
|
||||
std::vector<ColourStop> stops;
|
||||
switch (sacDraw.style) {
|
||||
case IndicatorStyle::Gradient:
|
||||
stops.emplace_back(0.0f, start);
|
||||
stops.emplace_back(1.0f, end);
|
||||
stops.push_back(ColourStop(0.0, start));
|
||||
stops.push_back(ColourStop(1.0, end));
|
||||
break;
|
||||
case IndicatorStyle::GradientCentre:
|
||||
stops.emplace_back(0.0f, end);
|
||||
stops.emplace_back(0.5f, start);
|
||||
stops.emplace_back(1.0f, end);
|
||||
stops.push_back(ColourStop(0.0, end));
|
||||
stops.push_back(ColourStop(0.5, start));
|
||||
stops.push_back(ColourStop(1.0, end));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@ -8,9 +8,6 @@
|
||||
#ifndef PARTITIONING_H
|
||||
#define PARTITIONING_H
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
#include <memory>
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
namespace Scintilla::Internal {
|
||||
|
||||
/// Divide an interval into multiple partitions.
|
||||
|
||||
@ -81,12 +81,6 @@
|
||||
|
||||
#endif
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
#include <optional>
|
||||
#include "ScintillaTypes.h"
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
|
||||
|
||||
namespace Scintilla::Internal {
|
||||
|
||||
// Underlying the implementation of the platform classes are platform specific types.
|
||||
@ -156,24 +150,23 @@ public:
|
||||
|
||||
class IScreenLine {
|
||||
public:
|
||||
virtual ~IScreenLine() noexcept = default;
|
||||
virtual std::string_view Text() const noexcept = 0;
|
||||
virtual size_t Length() const noexcept = 0;
|
||||
virtual std::string_view Text() const = 0;
|
||||
virtual size_t Length() const = 0;
|
||||
virtual size_t RepresentationCount() const = 0;
|
||||
virtual XYPOSITION Width() const noexcept = 0;
|
||||
virtual XYPOSITION Height() const noexcept = 0;
|
||||
virtual XYPOSITION TabWidth() const noexcept = 0;
|
||||
virtual XYPOSITION TabWidthMinimumPixels() const noexcept = 0;
|
||||
virtual const Font *FontOfPosition(size_t position) const noexcept = 0;
|
||||
virtual XYPOSITION RepresentationWidth(size_t position) const noexcept = 0;
|
||||
virtual XYPOSITION TabPositionAfter(XYPOSITION xPosition) const noexcept = 0;
|
||||
virtual XYPOSITION Width() const = 0;
|
||||
virtual XYPOSITION Height() const = 0;
|
||||
virtual XYPOSITION TabWidth() const = 0;
|
||||
virtual XYPOSITION TabWidthMinimumPixels() const = 0;
|
||||
virtual const Font *FontOfPosition(size_t position) const = 0;
|
||||
virtual XYPOSITION RepresentationWidth(size_t position) const = 0;
|
||||
virtual XYPOSITION TabPositionAfter(XYPOSITION xPosition) const = 0;
|
||||
};
|
||||
|
||||
class IScreenLineLayout {
|
||||
public:
|
||||
virtual ~IScreenLineLayout() noexcept = default;
|
||||
virtual size_t PositionFromX(XYPOSITION xDistance, bool charPosition) = 0;
|
||||
virtual XYPOSITION XFromPosition(size_t caretPosition) noexcept = 0;
|
||||
virtual XYPOSITION XFromPosition(size_t caretPosition) = 0;
|
||||
virtual std::vector<Interval> FindRangeIntervals(size_t start, size_t end) = 0;
|
||||
};
|
||||
|
||||
|
||||
@ -401,11 +401,11 @@ ScreenLine::ScreenLine(
|
||||
|
||||
ScreenLine::~ScreenLine() = default;
|
||||
|
||||
std::string_view ScreenLine::Text() const noexcept {
|
||||
std::string_view ScreenLine::Text() const {
|
||||
return std::string_view(&ll->chars[start], len);
|
||||
}
|
||||
|
||||
size_t ScreenLine::Length() const noexcept {
|
||||
size_t ScreenLine::Length() const {
|
||||
return len;
|
||||
}
|
||||
|
||||
@ -415,31 +415,31 @@ size_t ScreenLine::RepresentationCount() const {
|
||||
[](XYPOSITION w) noexcept { return w > 0.0f; });
|
||||
}
|
||||
|
||||
XYPOSITION ScreenLine::Width() const noexcept {
|
||||
XYPOSITION ScreenLine::Width() const {
|
||||
return width;
|
||||
}
|
||||
|
||||
XYPOSITION ScreenLine::Height() const noexcept {
|
||||
XYPOSITION ScreenLine::Height() const {
|
||||
return height;
|
||||
}
|
||||
|
||||
XYPOSITION ScreenLine::TabWidth() const noexcept {
|
||||
XYPOSITION ScreenLine::TabWidth() const {
|
||||
return tabWidth;
|
||||
}
|
||||
|
||||
XYPOSITION ScreenLine::TabWidthMinimumPixels() const noexcept {
|
||||
XYPOSITION ScreenLine::TabWidthMinimumPixels() const {
|
||||
return static_cast<XYPOSITION>(tabWidthMinimumPixels);
|
||||
}
|
||||
|
||||
const Font *ScreenLine::FontOfPosition(size_t position) const noexcept {
|
||||
const Font *ScreenLine::FontOfPosition(size_t position) const {
|
||||
return ll->bidiData->stylesFonts[start + position].get();
|
||||
}
|
||||
|
||||
XYPOSITION ScreenLine::RepresentationWidth(size_t position) const noexcept {
|
||||
XYPOSITION ScreenLine::RepresentationWidth(size_t position) const {
|
||||
return ll->bidiData->widthReprs[start + position];
|
||||
}
|
||||
|
||||
XYPOSITION ScreenLine::TabPositionAfter(XYPOSITION xPosition) const noexcept {
|
||||
XYPOSITION ScreenLine::TabPositionAfter(XYPOSITION xPosition) const {
|
||||
return (std::floor((xPosition + TabWidthMinimumPixels()) / TabWidth()) + 1) * TabWidth();
|
||||
}
|
||||
|
||||
|
||||
@ -122,16 +122,16 @@ struct ScreenLine : public IScreenLine {
|
||||
void operator=(ScreenLine &&) = delete;
|
||||
virtual ~ScreenLine();
|
||||
|
||||
std::string_view Text() const noexcept override;
|
||||
size_t Length() const noexcept override;
|
||||
std::string_view Text() const override;
|
||||
size_t Length() const override;
|
||||
size_t RepresentationCount() const override;
|
||||
XYPOSITION Width() const noexcept override;
|
||||
XYPOSITION Height() const noexcept override;
|
||||
XYPOSITION TabWidth() const noexcept override;
|
||||
XYPOSITION TabWidthMinimumPixels() const noexcept override;
|
||||
const Font *FontOfPosition(size_t position) const noexcept override;
|
||||
XYPOSITION RepresentationWidth(size_t position) const noexcept override;
|
||||
XYPOSITION TabPositionAfter(XYPOSITION xPosition) const noexcept override;
|
||||
XYPOSITION Width() const override;
|
||||
XYPOSITION Height() const override;
|
||||
XYPOSITION TabWidth() const override;
|
||||
XYPOSITION TabWidthMinimumPixels() const override;
|
||||
const Font *FontOfPosition(size_t position) const override;
|
||||
XYPOSITION RepresentationWidth(size_t position) const override;
|
||||
XYPOSITION TabPositionAfter(XYPOSITION xPosition) const override;
|
||||
};
|
||||
|
||||
struct SignificantLines {
|
||||
|
||||
@ -321,7 +321,7 @@ void RunStyles<DISTANCE, STYLE>::Check() const {
|
||||
|
||||
template class Scintilla::Internal::RunStyles<int, int>;
|
||||
template class Scintilla::Internal::RunStyles<int, char>;
|
||||
#if (PTRDIFF_MAX != INT_MAX) || defined(__HAIKU__)
|
||||
#if (PTRDIFF_MAX != INT_MAX) || defined(__HAIKU__) || defined(PTRDIFF_DOESNT_ALIAS_INT)
|
||||
template class Scintilla::Internal::RunStyles<ptrdiff_t, int>;
|
||||
template class Scintilla::Internal::RunStyles<ptrdiff_t, char>;
|
||||
#endif
|
||||
|
||||
@ -156,12 +156,10 @@ int ScintillaBase::KeyCommand(Message iMessage) {
|
||||
AutoCompleteMove(-ac.lb->GetVisibleRows());
|
||||
return 0;
|
||||
case Message::VCHome:
|
||||
case Message::HomeWrap:
|
||||
AutoCompleteMove(-10000);
|
||||
AutoCompleteMove(-5000);
|
||||
return 0;
|
||||
case Message::LineEnd:
|
||||
case Message::LineEndWrap:
|
||||
AutoCompleteMove(10000);
|
||||
AutoCompleteMove(5000);
|
||||
return 0;
|
||||
case Message::DeleteBack:
|
||||
DelCharBack(true);
|
||||
@ -563,10 +561,6 @@ void ScintillaBase::CallTipClick() {
|
||||
NotifyParent(scn);
|
||||
}
|
||||
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
#if SCI_EnablePopupMenu
|
||||
|
||||
bool ScintillaBase::ShouldDisplayPopup(Point ptInWindowCoordinates) const {
|
||||
return (displayPopupMenu == PopUp::All ||
|
||||
(displayPopupMenu == PopUp::Text && !PointInSelMargin(ptInWindowCoordinates)));
|
||||
@ -589,10 +583,6 @@ void ScintillaBase::ContextMenu(Point pt) {
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
|
||||
|
||||
void ScintillaBase::CancelModes() {
|
||||
AutoCompleteCancel();
|
||||
ct.CallTipCancel();
|
||||
|
||||
@ -87,13 +87,9 @@ protected:
|
||||
void CallTipShow(Point pt, const char *defn);
|
||||
virtual void CreateCallTipWindow(PRectangle rc) = 0;
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
#if SCI_EnablePopupMenu
|
||||
virtual void AddToPopUp(const char *label, int cmd=0, bool enabled=true) = 0;
|
||||
bool ShouldDisplayPopup(Point ptInWindowCoordinates) const;
|
||||
void ContextMenu(Point pt);
|
||||
#endif
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
|
||||
void ButtonDownWithModifiers(Point pt, unsigned int curTime, Scintilla::KeyMod modifiers) override;
|
||||
void RightButtonDownWithModifiers(Point pt, unsigned int curTime, Scintilla::KeyMod modifiers) override;
|
||||
@ -101,7 +97,7 @@ protected:
|
||||
void NotifyStyleToNeeded(Sci::Position endStyleNeeded) override;
|
||||
|
||||
public:
|
||||
virtual ~ScintillaBase() override;
|
||||
~ScintillaBase() override;
|
||||
|
||||
// Public so scintilla_send_message can use it
|
||||
Scintilla::sptr_t WndProc(Scintilla::Message iMessage, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam) override;
|
||||
|
||||
@ -9,10 +9,6 @@
|
||||
#ifndef SPLITVECTOR_H
|
||||
#define SPLITVECTOR_H
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
#include "Debugging.h"
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
|
||||
namespace Scintilla::Internal {
|
||||
|
||||
template <typename T>
|
||||
|
||||
@ -74,9 +74,6 @@ Style::Style(const char *fontName_) noexcept :
|
||||
back(white),
|
||||
eolFilled(false),
|
||||
underline(false),
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
strike(false),
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
caseForce(CaseForce::mixed),
|
||||
visible(true),
|
||||
changeable(true),
|
||||
|
||||
@ -47,9 +47,6 @@ public:
|
||||
ColourRGBA back;
|
||||
bool eolFilled;
|
||||
bool underline;
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
bool strike;
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
enum class CaseForce {mixed, upper, lower, camel};
|
||||
CaseForce caseForce;
|
||||
bool visible;
|
||||
|
||||
@ -61,12 +61,9 @@ bool MarginStyle::ShowsFolding() const noexcept {
|
||||
|
||||
void FontRealised::Realise(Surface &surface, int zoomLevel, Technology technology, const FontSpecification &fs, const char *localeName) {
|
||||
PLATFORM_ASSERT(fs.fontName);
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
//~measurements.sizeZoomed = fs.size + zoomLevel * FontSizeMultiplier;
|
||||
//~if (measurements.sizeZoomed <= FontSizeMultiplier) // May fail if sizeZoomed < 1
|
||||
//~ measurements.sizeZoomed = FontSizeMultiplier;
|
||||
measurements.sizeZoomed = GetFontSizeZoomed(fs.size, zoomLevel);
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
measurements.sizeZoomed = fs.size + zoomLevel * FontSizeMultiplier;
|
||||
if (measurements.sizeZoomed <= FontSizeMultiplier) // May fail if sizeZoomed < 1
|
||||
measurements.sizeZoomed = FontSizeMultiplier;
|
||||
|
||||
const float deviceHeight = static_cast<float>(surface.DeviceHeightFont(measurements.sizeZoomed));
|
||||
const FontParameters fp(fs.fontName, deviceHeight / FontSizeMultiplier, fs.weight,
|
||||
@ -228,9 +225,7 @@ ViewStyle::ViewStyle(size_t stylesSize_) :
|
||||
marginInside = true;
|
||||
CalculateMarginWidthAndMask();
|
||||
textStart = marginInside ? fixedColumnWidth : leftMarginWidth;
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
zoomLevel = 100; /// @ 20018-09-06 Changed to percent
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
zoomLevel = 0;
|
||||
viewWhitespace = WhiteSpace::Invisible;
|
||||
tabDrawMode = TabDrawMode::LongArrow;
|
||||
whitespaceSize = 1;
|
||||
@ -418,9 +413,11 @@ void ViewStyle::Refresh(Surface &surface, int tabInChars) {
|
||||
maxAscent = std::max(1.0, maxAscent + extraAscent);
|
||||
maxDescent = std::max(0.0, maxDescent + extraDescent);
|
||||
lineHeight = static_cast<int>(std::lround(maxAscent + maxDescent));
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
lineOverlap = std::clamp(lineHeight / 10, 1, std::max(1, lineHeight));
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
lineOverlap = lineHeight / 10;
|
||||
if (lineOverlap < 2)
|
||||
lineOverlap = 2;
|
||||
if (lineOverlap > lineHeight)
|
||||
lineOverlap = lineHeight;
|
||||
|
||||
someStylesProtected = std::any_of(styles.cbegin(), styles.cend(),
|
||||
[](const Style &style) noexcept { return style.IsProtected(); });
|
||||
@ -430,10 +427,7 @@ void ViewStyle::Refresh(Surface &surface, int tabInChars) {
|
||||
|
||||
aveCharWidth = styles[StyleDefault].aveCharWidth;
|
||||
spaceWidth = styles[StyleDefault].spaceWidth;
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
//~tabWidth = spaceWidth * tabInChars;
|
||||
tabWidth = aveCharWidth * tabInChars;
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
tabWidth = spaceWidth * tabInChars;
|
||||
|
||||
controlCharWidth = 0.0;
|
||||
if (controlCharSymbol >= 32) {
|
||||
@ -767,44 +761,6 @@ ViewStyle::CaretShape ViewStyle::CaretShapeForMode(bool inOverstrike, bool isMai
|
||||
return (caretStyle <= CaretStyle::Block) ? static_cast<CaretShape>(caretStyle) : CaretShape::line;
|
||||
}
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
bool ViewStyle::ZoomIn() noexcept {
|
||||
if (zoomLevel < SC_MAX_ZOOM_LEVEL) {
|
||||
int level = zoomLevel;
|
||||
if (level < 200) {
|
||||
level += 10;
|
||||
} else {
|
||||
level += 25;
|
||||
}
|
||||
|
||||
level = std::min(level, SC_MAX_ZOOM_LEVEL);
|
||||
if (level != zoomLevel) {
|
||||
zoomLevel = level;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ViewStyle::ZoomOut() noexcept {
|
||||
if (zoomLevel > SC_MIN_ZOOM_LEVEL) {
|
||||
int level = zoomLevel;
|
||||
if (level <= 200) {
|
||||
level -= 10;
|
||||
} else {
|
||||
level -= 25;
|
||||
}
|
||||
|
||||
level = std::max(level, SC_MIN_ZOOM_LEVEL);
|
||||
if (level != zoomLevel) {
|
||||
zoomLevel = level;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
|
||||
void ViewStyle::AllocStyles(size_t sizeNew) {
|
||||
size_t i=styles.size();
|
||||
styles.resize(sizeNew);
|
||||
@ -826,10 +782,10 @@ void ViewStyle::CreateAndAddFont(const FontSpecification &fs) {
|
||||
}
|
||||
}
|
||||
|
||||
FontRealised *ViewStyle::Find(const FontSpecification &fs) const {
|
||||
FontRealised *ViewStyle::Find(const FontSpecification &fs) {
|
||||
if (!fs.fontName) // Invalid specification so return arbitrary object
|
||||
return fonts.begin()->second.get();
|
||||
const auto it = fonts.find(fs);
|
||||
const FontMap::iterator it = fonts.find(fs);
|
||||
if (it != fonts.end()) {
|
||||
// Should always reach here since map was just set for all styles
|
||||
return it->second.get();
|
||||
|
||||
@ -8,10 +8,6 @@
|
||||
#ifndef VIEWSTYLE_H
|
||||
#define VIEWSTYLE_H
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
#include "Scintilla.h"
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
|
||||
namespace Scintilla::Internal {
|
||||
|
||||
/**
|
||||
@ -71,14 +67,6 @@ struct CaretLineAppearance {
|
||||
int frame = 0;
|
||||
};
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
constexpr int GetFontSizeZoomed(int size, int zoomLevel) noexcept {
|
||||
size = (size * zoomLevel + 50) / 100;
|
||||
// Hangs if sizeZoomed (in point) <= 1
|
||||
return std::max(size, 2 * FontSizeMultiplier);
|
||||
}
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
|
||||
struct CaretAppearance {
|
||||
// Line, block, over-strike bar ...
|
||||
Scintilla::CaretStyle style = CaretStyle::Line;
|
||||
@ -160,9 +148,7 @@ public:
|
||||
int fixedColumnWidth = 0; ///< Total width of margins
|
||||
bool marginInside; ///< true: margin included in text view, false: separate views
|
||||
int textStart; ///< Starting x position of text within the view
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
int zoomLevel; /// @ 2018-09-06 Changed to a percent value
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
int zoomLevel;
|
||||
Scintilla::WhiteSpace viewWhitespace;
|
||||
Scintilla::TabDrawMode tabDrawMode;
|
||||
int whitespaceSize;
|
||||
@ -259,15 +245,11 @@ public:
|
||||
bool IsCaretVisible(bool isMainSelection) const noexcept;
|
||||
bool DrawCaretInsideSelection(bool inOverstrike, bool imeCaretBlockOverride) const noexcept;
|
||||
CaretShape CaretShapeForMode(bool inOverstrike, bool isMainSelection) const noexcept;
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
bool ZoomIn() noexcept;
|
||||
bool ZoomOut() noexcept;
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
|
||||
private:
|
||||
void AllocStyles(size_t sizeNew);
|
||||
void CreateAndAddFont(const FontSpecification &fs);
|
||||
FontRealised *Find(const FontSpecification &fs) const;
|
||||
FontRealised *Find(const FontSpecification &fs);
|
||||
void FindMaxAscentDescent() noexcept;
|
||||
};
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
557
|
||||
558
|
||||
|
||||
@ -537,9 +537,7 @@ void ListBoxX::SetOptions(ListOptions options_) {
|
||||
|
||||
void ListBoxX::AdjustWindowRect(PRectangle *rc, UINT dpiAdjust) const noexcept {
|
||||
RECT rcw = RectFromPRectangle(*rc);
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
AdjustWindowRectForDpi(&rcw, frameStyle, WS_EX_WINDOWEDGE, dpiAdjust);
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
AdjustWindowRectForDpi(&rcw, frameStyle, dpiAdjust);
|
||||
*rc = PRectangleFromRECT(rcw);
|
||||
}
|
||||
|
||||
|
||||
@ -29,11 +29,9 @@
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#undef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0601 /*_WIN32_WINNT_WIN7*/
|
||||
//~#define _WIN32_WINNT 0x0A00 /*_WIN32_WINNT_WINTHRESHOLD, _WIN32_WINNT_WIN10*/
|
||||
#define _WIN32_WINNT 0x0A00
|
||||
#undef WINVER
|
||||
#define WINVER 0x0601 /*_WIN32_WINNT_WIN7*/
|
||||
//~#define WINVER 0x0A00 /*_WIN32_WINNT_WINTHRESHOLD, _WIN32_WINNT_WIN10*/
|
||||
#define WINVER 0x0A00
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
@ -201,14 +199,13 @@ int SystemMetricsForDpi(int nIndex, UINT dpi) noexcept {
|
||||
return value;
|
||||
}
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
BOOL AdjustWindowRectForDpi(LPRECT lpRect, DWORD dwStyle, DWORD dwExStyle, UINT dpi) noexcept {
|
||||
void AdjustWindowRectForDpi(LPRECT lpRect, DWORD dwStyle, UINT dpi) noexcept {
|
||||
if (fnAdjustWindowRectExForDpi) {
|
||||
return fnAdjustWindowRectExForDpi(lpRect, dwStyle, FALSE, dwExStyle, dpi);
|
||||
fnAdjustWindowRectExForDpi(lpRect, dwStyle, false, WS_EX_WINDOWEDGE, dpi);
|
||||
} else {
|
||||
::AdjustWindowRectEx(lpRect, dwStyle, false, WS_EX_WINDOWEDGE);
|
||||
}
|
||||
return ::AdjustWindowRectEx(lpRect, dwStyle, FALSE, dwExStyle);
|
||||
}
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@ -70,12 +70,7 @@ float GetDeviceScaleFactorWhenGdiScalingActive(HWND hWnd) noexcept;
|
||||
|
||||
int SystemMetricsForDpi(int nIndex, UINT dpi) noexcept;
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
#ifndef AlphaBlend
|
||||
#define AlphaBlend GdiAlphaBlend
|
||||
#endif
|
||||
BOOL AdjustWindowRectForDpi(LPRECT lpRect, DWORD dwStyle, DWORD dwExStyle, UINT dpi) noexcept;
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
void AdjustWindowRectForDpi(LPRECT lpRect, DWORD dwStyle, UINT dpi) noexcept;
|
||||
|
||||
HCURSOR LoadReverseArrowCursor(UINT dpi) noexcept;
|
||||
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
// Resource file for Scintilla
|
||||
// encoding: UTF-8
|
||||
#pragma code_page(65001) // UTF-8
|
||||
// Copyright 1998-2021 by Neil Hodgson <neilh@scintilla.org>
|
||||
// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#define VERSION_SCINTILLA "5.5.7"
|
||||
#define VERSION_WORDS 5, 5, 7, 0
|
||||
#define VERSION_SCINTILLA "5.5.8"
|
||||
#define VERSION_WORDS 5, 5, 8, 0
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION VERSION_WORDS
|
||||
@ -27,12 +25,12 @@ BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Neil Hodgson neilh@scintilla.org\0"
|
||||
VALUE "FileDescription", "Scintilla.DLL - a Source Editing Component vNP3\0"
|
||||
VALUE "FileDescription", "Scintilla.DLL - a Source Editing Component\0"
|
||||
VALUE "FileVersion", VERSION_SCINTILLA "\0"
|
||||
VALUE "InternalName", "Scintilla vNP3\0"
|
||||
VALUE "LegalCopyright", "Copyright 1998-2022 by Neil Hodgson\0"
|
||||
VALUE "InternalName", "Scintilla\0"
|
||||
VALUE "LegalCopyright", "Copyright 1998-2012 by Neil Hodgson\0"
|
||||
VALUE "OriginalFilename", "Scintilla.DLL\0"
|
||||
VALUE "ProductName", "Scintilla vNP3\0"
|
||||
VALUE "ProductName", "Scintilla\0"
|
||||
VALUE "ProductVersion", VERSION_SCINTILLA "\0"
|
||||
END
|
||||
END
|
||||
|
||||
@ -20,7 +20,7 @@ using namespace Scintilla;
|
||||
|
||||
extern "C"
|
||||
__declspec(dllexport)
|
||||
sptr_t APIENTRY Scintilla_DirectFunction(
|
||||
sptr_t __stdcall Scintilla_DirectFunction(
|
||||
Internal::ScintillaWin *sci, UINT iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
return Internal::DirectFunction(sci, iMessage, wParam, lParam);
|
||||
}
|
||||
|
||||
@ -33,11 +33,9 @@
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#undef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0601 /*_WIN32_WINNT_WIN7*/
|
||||
//~#define _WIN32_WINNT 0x0A00 /*_WIN32_WINNT_WINTHRESHOLD, _WIN32_WINNT_WIN10*/
|
||||
#define _WIN32_WINNT 0x0A00
|
||||
#undef WINVER
|
||||
#define WINVER 0x0601 /*_WIN32_WINNT_WIN7*/
|
||||
//~#define WINVER 0x0A00 /*_WIN32_WINNT_WINTHRESHOLD, _WIN32_WINNT_WIN10*/
|
||||
#define WINVER 0x0A00
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
@ -153,8 +151,8 @@ constexpr Point PointFromLParam(sptr_t lpoint) noexcept {
|
||||
return Point::FromInts(GET_X_LPARAM(lpoint), GET_Y_LPARAM(lpoint));
|
||||
}
|
||||
|
||||
inline bool KeyboardIsKeyDown(int key) noexcept {
|
||||
return (::GetKeyState(key) & 0x8000) != 0;
|
||||
bool KeyboardIsKeyDown(int key) noexcept {
|
||||
return (::GetKeyState(key) & 0x80000000) != 0;
|
||||
}
|
||||
|
||||
// Bit 24 is the extended keyboard flag and the numeric keypad is non-extended
|
||||
@ -335,12 +333,9 @@ public:
|
||||
|
||||
void SetCompositionFont(const ViewStyle &vs, int style, UINT dpi) const {
|
||||
LOGFONTW lf{};
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
//int sizeZoomed = vs.styles[style].size + (vs.zoomLevel * FontSizeMultiplier);
|
||||
//if (sizeZoomed <= 2 * FontSizeMultiplier) // Hangs if sizeZoomed <= 1
|
||||
// sizeZoomed = 2 * FontSizeMultiplier;
|
||||
int const sizeZoomed = GetFontSizeZoomed(vs.styles[style].size, vs.zoomLevel);
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
int sizeZoomed = vs.styles[style].size + (vs.zoomLevel * FontSizeMultiplier);
|
||||
if (sizeZoomed <= 2 * FontSizeMultiplier) // Hangs if sizeZoomed <= 1
|
||||
sizeZoomed = 2 * FontSizeMultiplier;
|
||||
// The negative is to allow for leading
|
||||
lf.lfHeight = -::MulDiv(sizeZoomed, dpi, pointsPerInch * FontSizeMultiplier);
|
||||
lf.lfWeight = static_cast<LONG>(vs.styles[style].weight);
|
||||
@ -588,7 +583,7 @@ class ScintillaWin :
|
||||
enum : UINT_PTR { invalidTimerID, standardTimerID, idleTimerID, fineTimerStart };
|
||||
|
||||
void DisplayCursor(Window::Cursor c) override;
|
||||
bool DragThreshold(Point ptStart, Point ptNow) noexcept override;
|
||||
bool DragThreshold(Point ptStart, Point ptNow) override;
|
||||
void StartDrag() override;
|
||||
static KeyMod MouseModifiers(uptr_t wParam) noexcept;
|
||||
|
||||
@ -633,7 +628,7 @@ class ScintillaWin :
|
||||
void SetTrackMouseLeaveEvent(bool on) noexcept;
|
||||
void HideCursorIfPreferred() noexcept;
|
||||
void UpdateBaseElements() override;
|
||||
bool PaintContains(PRectangle rc) const noexcept override;
|
||||
bool PaintContains(PRectangle rc) override;
|
||||
void ScrollText(Sci::Line linesToMove) override;
|
||||
void NotifyCaretMove() override;
|
||||
void UpdateSystemCaret() override;
|
||||
@ -645,7 +640,7 @@ class ScintillaWin :
|
||||
void NotifyChange() override;
|
||||
void NotifyFocus(bool focus) override;
|
||||
void SetCtrlID(int identifier) override;
|
||||
int GetCtrlID() const noexcept override;
|
||||
int GetCtrlID() override;
|
||||
void NotifyParent(NotificationData scn) override;
|
||||
void NotifyDoubleClick(Point pt, KeyMod modifiers) override;
|
||||
std::unique_ptr<CaseFolder> CaseFolderForEncoding() override;
|
||||
@ -654,11 +649,7 @@ class ScintillaWin :
|
||||
bool CanPaste() override;
|
||||
void Paste() override;
|
||||
void CreateCallTipWindow(PRectangle rc) override;
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
#if SCI_EnablePopupMenu
|
||||
void AddToPopUp(const char *label, int cmd = 0, bool enabled = true) override;
|
||||
#endif
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
void ClaimSelection() override;
|
||||
|
||||
void GetMouseParameters() noexcept;
|
||||
@ -679,11 +670,7 @@ class ScintillaWin :
|
||||
sptr_t GetTextLength();
|
||||
sptr_t GetText(uptr_t wParam, sptr_t lParam);
|
||||
Window::Cursor ContextCursor(Point pt);
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
#if SCI_EnablePopupMenu
|
||||
sptr_t ShowContextMenu(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
|
||||
#endif
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
[[nodiscard]] PRectangle GetClientRectangle() const override;
|
||||
void SizeWindow();
|
||||
sptr_t MouseMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
|
||||
@ -1081,7 +1068,7 @@ void ScintillaWin::DisplayCursor(Window::Cursor c) {
|
||||
}
|
||||
}
|
||||
|
||||
bool ScintillaWin::DragThreshold(Point ptStart, Point ptNow) noexcept {
|
||||
bool ScintillaWin::DragThreshold(Point ptStart, Point ptNow) {
|
||||
const Point ptDifference = ptStart - ptNow;
|
||||
const XYPOSITION xMove = std::trunc(std::abs(ptDifference.x));
|
||||
const XYPOSITION yMove = std::trunc(std::abs(ptDifference.y));
|
||||
@ -1771,21 +1758,11 @@ Window::Cursor ScintillaWin::ContextCursor(Point pt) {
|
||||
const Sci::Position pos = PositionFromLocation(pt, true, true);
|
||||
if (pos != Sci::invalidPosition) {
|
||||
return Window::Cursor::hand;
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
} else if (hoverIndicatorPos != Sci::invalidPosition) {
|
||||
if (pos != Sci::invalidPosition) {
|
||||
const bool altDown = KeyboardIsKeyDown(VK_MENU);
|
||||
const bool ctrlDown = KeyboardIsKeyDown(VK_CONTROL);
|
||||
return ctrlDown ? Window::Cursor::hand : (altDown ? Window::Cursor::arrow : Window::Cursor::text);
|
||||
}
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
}
|
||||
}
|
||||
return Window::Cursor::text;
|
||||
}
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
#if SCI_EnablePopupMenu
|
||||
sptr_t ScintillaWin::ShowContextMenu(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
Point ptScreen = PointFromLParam(lParam);
|
||||
Point ptClient;
|
||||
@ -1806,8 +1783,6 @@ sptr_t ScintillaWin::ShowContextMenu(unsigned int iMessage, uptr_t wParam, sptr_
|
||||
}
|
||||
return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam);
|
||||
}
|
||||
#endif
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
|
||||
PRectangle ScintillaWin::GetClientRectangle() const {
|
||||
return rectangleClient;
|
||||
@ -1878,30 +1853,19 @@ sptr_t ScintillaWin::MouseMessage(unsigned int iMessage, uptr_t wParam, sptr_t l
|
||||
break;
|
||||
|
||||
case WM_MOUSEMOVE: {
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
cursorIsHidden = false; // to be shown by ButtonMoveWithModifiers
|
||||
const Point pt = PointFromLParam(lParam);
|
||||
|
||||
// Windows might send WM_MOUSEMOVE even though the mouse has not been moved:
|
||||
// http://blogs.msdn.com/b/oldnewthing/archive/2003/10/01/55108.aspx
|
||||
if (ptMouseLast != pt) {
|
||||
if (cursorIsHidden) {
|
||||
::ShowCursor(TRUE);
|
||||
cursorIsHidden = false; // to be shown by ButtonMoveWithModifiers
|
||||
}
|
||||
SetTrackMouseLeaveEvent(true);
|
||||
ButtonMoveWithModifiers(pt, ::GetMessageTime(), MouseModifiers(wParam));
|
||||
}
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_MOUSELEAVE:
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
if (cursorIsHidden) {
|
||||
::ShowCursor(TRUE);
|
||||
cursorIsHidden = false;
|
||||
}
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
SetTrackMouseLeaveEvent(false);
|
||||
MouseLeave();
|
||||
return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam);
|
||||
@ -1955,23 +1919,18 @@ sptr_t ScintillaWin::MouseMessage(unsigned int iMessage, uptr_t wParam, sptr_t l
|
||||
}
|
||||
linesToScroll *= verticalWheelDelta.Actions();
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
if (wParam & (MK_CONTROL | MK_RBUTTON)) {
|
||||
if (wParam & (MK_CONTROL)) {
|
||||
if (wParam & MK_CONTROL) {
|
||||
// Zoom! We play with the font sizes in the styles.
|
||||
// Number of steps/line is ignored, we just care if sizing up or down
|
||||
if (linesToScroll < 0)
|
||||
KeyCommand(Message::ZoomIn);
|
||||
else
|
||||
KeyCommand(Message::ZoomOut);
|
||||
if (linesToScroll < 0) {
|
||||
KeyCommand(Message::ZoomIn);
|
||||
} else {
|
||||
KeyCommand(Message::ZoomOut);
|
||||
}
|
||||
// send to main window (trigger zoom callTip or undo/redo history) !
|
||||
::DefWindowProc(MainHWND(), iMessage, wParam, lParam);
|
||||
} else {
|
||||
// Scroll
|
||||
ScrollTo(topLine + linesToScroll);
|
||||
}
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -2003,15 +1962,6 @@ sptr_t ScintillaWin::KeyMessage(unsigned int iMessage, uptr_t wParam, sptr_t lPa
|
||||
altDown),
|
||||
&lastKeyDownConsumed);
|
||||
if (!ret && !lastKeyDownConsumed) {
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
if (hoverIndicatorPos != Sci::invalidPosition) {
|
||||
POINT pt;
|
||||
if (::GetCursorPos(&pt)) {
|
||||
::ScreenToClient(MainHWND(), &pt);
|
||||
DisplayCursor(ContextCursor(PointFromPOINT(pt)));
|
||||
}
|
||||
}
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam);
|
||||
}
|
||||
break;
|
||||
@ -2019,15 +1969,6 @@ sptr_t ScintillaWin::KeyMessage(unsigned int iMessage, uptr_t wParam, sptr_t lPa
|
||||
|
||||
case WM_KEYUP:
|
||||
//Platform::DebugPrintf("S keyup %d %x %x\n",iMessage, wParam, lParam);
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
if (hoverIndicatorPos != Sci::invalidPosition) {
|
||||
POINT pt;
|
||||
if (::GetCursorPos(&pt)) {
|
||||
::ScreenToClient(MainHWND(), &pt);
|
||||
DisplayCursor(ContextCursor(PointFromPOINT(pt)));
|
||||
}
|
||||
}
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam);
|
||||
|
||||
case WM_CHAR:
|
||||
@ -2067,12 +2008,6 @@ sptr_t ScintillaWin::KeyMessage(unsigned int iMessage, uptr_t wParam, sptr_t lPa
|
||||
sptr_t ScintillaWin::FocusMessage(unsigned int iMessage, uptr_t wParam, sptr_t) {
|
||||
switch (iMessage) {
|
||||
case WM_KILLFOCUS: {
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
if (cursorIsHidden) {
|
||||
::ShowCursor(TRUE);
|
||||
cursorIsHidden = false;
|
||||
}
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
HWND wOther = reinterpret_cast<HWND>(wParam);
|
||||
HWND wThis = MainHWND();
|
||||
const HWND wCT = HwndFromWindow(ct.wCallTip);
|
||||
@ -2459,7 +2394,6 @@ sptr_t ScintillaWin::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
InvalidateStyleRedraw();
|
||||
break;
|
||||
|
||||
#if(WINVER >= 0x0605)
|
||||
case WM_DPICHANGED_AFTERPARENT: {
|
||||
const UINT dpiNow = DpiForWindow(wMain.GetID());
|
||||
if (dpi != dpiNow) {
|
||||
@ -2469,14 +2403,9 @@ sptr_t ScintillaWin::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
#if SCI_EnablePopupMenu
|
||||
case WM_CONTEXTMENU:
|
||||
return ShowContextMenu(msg, wParam, lParam);
|
||||
#endif
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
return 1; // Avoid any background erasure as whole window painted.
|
||||
@ -2682,10 +2611,7 @@ void ScintillaWin::SetTrackMouseLeaveEvent(bool on) noexcept {
|
||||
void ScintillaWin::HideCursorIfPreferred() noexcept {
|
||||
// SPI_GETMOUSEVANISH from OS.
|
||||
if (typingWithoutCursor && !cursorIsHidden) {
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
//::SetCursor({});
|
||||
::ShowCursor(FALSE);
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
::SetCursor({});
|
||||
cursorIsHidden = true;
|
||||
}
|
||||
}
|
||||
@ -2707,7 +2633,7 @@ void ScintillaWin::UpdateBaseElements() {
|
||||
}
|
||||
}
|
||||
|
||||
bool ScintillaWin::PaintContains(PRectangle rc) const noexcept {
|
||||
bool ScintillaWin::PaintContains(PRectangle rc) {
|
||||
if (paintState == PaintState::painting) {
|
||||
return BoundsContains(rcPaint, hRgnUpdate, rc);
|
||||
}
|
||||
@ -2851,7 +2777,7 @@ void ScintillaWin::SetCtrlID(int identifier) {
|
||||
::SetWindowID(HwndFromWindow(wMain), identifier);
|
||||
}
|
||||
|
||||
int ScintillaWin::GetCtrlID() const noexcept {
|
||||
int ScintillaWin::GetCtrlID() {
|
||||
return ::GetDlgCtrlID(HwndFromWindow(wMain));
|
||||
}
|
||||
|
||||
@ -3174,8 +3100,6 @@ void ScintillaWin::CreateCallTipWindow(PRectangle) {
|
||||
}
|
||||
}
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
#if SCI_EnablePopupMenu
|
||||
void ScintillaWin::AddToPopUp(const char *label, int cmd, bool enabled) {
|
||||
HMENU hmenuPopup = static_cast<HMENU>(popup.GetID());
|
||||
if (!label[0])
|
||||
@ -3185,8 +3109,6 @@ void ScintillaWin::AddToPopUp(const char *label, int cmd, bool enabled) {
|
||||
else
|
||||
::AppendMenuA(hmenuPopup, MF_STRING | MF_DISABLED | MF_GRAYED, cmd, label);
|
||||
}
|
||||
#endif
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
|
||||
void ScintillaWin::ClaimSelection() {
|
||||
// Windows does not have a primary selection
|
||||
@ -3816,9 +3738,6 @@ STDMETHODIMP ScintillaWin::DragOver(DWORD grfKeyState, POINTL pt, PDWORD pdwEffe
|
||||
// Update the cursor.
|
||||
POINT rpt = {pt.x, pt.y};
|
||||
::ScreenToClient(MainHWND(), &rpt);
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
if (!KeyboardIsKeyDown(VK_MENU)) // ALT-Key
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
SetDragPosition(SPositionFromLocation(PointFromPOINT(rpt), false, false, UserVirtualSpace()));
|
||||
|
||||
return S_OK;
|
||||
@ -4122,28 +4041,6 @@ sptr_t DirectFunction(
|
||||
return sci->WndProc(static_cast<Message>(iMessage), wParam, lParam);
|
||||
}
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
#ifdef SCINTILLA_DLL
|
||||
namespace Scintilla {
|
||||
sptr_t DirectFunction(ScintillaWin* sci, UINT iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
return sci->WndProc(iMessage, wParam, lParam);
|
||||
}
|
||||
}
|
||||
#else
|
||||
extern "C"
|
||||
sptr_t SCI_METHOD Scintilla_DirectFunction(
|
||||
ScintillaWin * sci, UINT iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
return sci->WndProc(static_cast<Message>(iMessage), wParam, lParam);
|
||||
}
|
||||
extern "C"
|
||||
sptr_t SCI_METHOD Scintilla_DirectStatusFunction(
|
||||
ScintillaWin * sci, UINT iMessage, uptr_t wParam, sptr_t lParam, int* pStatus) {
|
||||
const sptr_t returnValue = sci->WndProc(static_cast<Message>(iMessage), wParam, lParam);
|
||||
*pStatus = static_cast<int>(sci->errorStatus);
|
||||
return returnValue;
|
||||
}
|
||||
#endif
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
}
|
||||
|
||||
LRESULT PASCAL ScintillaWin::SWndProc(
|
||||
@ -4205,27 +4102,3 @@ int RegisterClasses(void *hInstance) noexcept {
|
||||
extern "C" int Scintilla_ReleaseResources() {
|
||||
return Scintilla::Internal::ResourcesRelease(false);
|
||||
}
|
||||
|
||||
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
|
||||
|
||||
extern "C" __declspec(dllexport)
|
||||
int Scintilla_InputCodePage(void) {
|
||||
return InputCodePage();
|
||||
}
|
||||
|
||||
extern "C" __declspec(dllexport)
|
||||
unsigned Scintilla_GetWindowDPI(void* hwnd) {
|
||||
return Scintilla::Internal::DpiForWindow(static_cast<Scintilla::Internal::WindowID>(hwnd));
|
||||
}
|
||||
|
||||
extern "C" __declspec(dllexport)
|
||||
int Scintilla_GetSystemMetricsForDpi(int nIndex, unsigned dpi) {
|
||||
return Scintilla::Internal::SystemMetricsForDpi(nIndex, dpi);
|
||||
}
|
||||
|
||||
extern "C" __declspec(dllexport)
|
||||
int Scintilla_AdjustWindowRectForDpi(LPWRECT lpRect, unsigned long dwStyle, unsigned long dwExStyle, unsigned dpi) {
|
||||
return Scintilla::Internal::AdjustWindowRectForDpi(reinterpret_cast<LPRECT>(lpRect), dwStyle, dwExStyle, dpi);
|
||||
}
|
||||
|
||||
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
|
||||
|
||||
@ -1028,7 +1028,7 @@ public:
|
||||
ScreenLineLayout &operator=(ScreenLineLayout &&) = delete;
|
||||
~ScreenLineLayout() noexcept override = default;
|
||||
size_t PositionFromX(XYPOSITION xDistance, bool charPosition) override;
|
||||
XYPOSITION XFromPosition(size_t caretPosition) noexcept override;
|
||||
XYPOSITION XFromPosition(size_t caretPosition) override;
|
||||
std::vector<Interval> FindRangeIntervals(size_t start, size_t end) override;
|
||||
};
|
||||
|
||||
@ -1208,7 +1208,7 @@ size_t ScreenLineLayout::PositionFromX(XYPOSITION xDistance, bool charPosition)
|
||||
|
||||
// Finds the point of the caret position
|
||||
|
||||
XYPOSITION ScreenLineLayout::XFromPosition(size_t caretPosition) noexcept {
|
||||
XYPOSITION ScreenLineLayout::XFromPosition(size_t caretPosition) {
|
||||
if (!textLayout) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
@ -41,6 +41,104 @@ The `lexilla/lexers_x/` folder contains **24 custom files** that MUST be preserv
|
||||
|
||||
---
|
||||
|
||||
## Scintilla.h NP3 Patches (CRITICAL)
|
||||
|
||||
The `scintilla/include/Scintilla.h` file has **extensive NP3 customizations** that must be merged into any new upstream version. These patches enable DLL binding and add NP3-specific features.
|
||||
|
||||
### Patch 1: DLL Export Functions (Lines 18-30)
|
||||
|
||||
**Added before `#ifdef __cplusplus`:**
|
||||
|
||||
```c
|
||||
// >>>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>>
|
||||
// ==============================================================
|
||||
// --- needed to bind Scintilla as dynamic link library (DLL) ---
|
||||
// ==============================================================
|
||||
typedef struct _wrct_t { long left; long top; long right; long bottom; } WRECT, *LPWRECT;
|
||||
__declspec(dllexport) int Scintilla_RegisterClasses(void *hInstance);
|
||||
__declspec(dllexport) int Scintilla_ReleaseResources(void);
|
||||
__declspec(dllexport) int Scintilla_InputCodePage(void);
|
||||
__declspec(dllexport) unsigned Scintilla_GetWindowDPI(void* hwnd);
|
||||
__declspec(dllexport) int Scintilla_GetSystemMetricsForDpi(int nIndex, unsigned dpi);
|
||||
__declspec(dllexport) int Scintilla_AdjustWindowRectForDpi(LPWRECT lpRect, unsigned long dwStyle, unsigned long dwExStyle, unsigned dpi);
|
||||
// <<<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<<
|
||||
```
|
||||
|
||||
**Purpose:** Required for NP3's DPI-aware window handling and DLL binding.
|
||||
|
||||
### Patch 2: C++ Header Include (Lines 37-41)
|
||||
|
||||
**Changed:**
|
||||
```c
|
||||
// Upstream:
|
||||
#include <stdint.h>
|
||||
|
||||
// NP3:
|
||||
#if defined(__cplusplus)
|
||||
#include <cstdint>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
```
|
||||
|
||||
### Patch 3: User-Defined Message Range (Line 60)
|
||||
|
||||
**Added:**
|
||||
```c
|
||||
#define SCI_DEV_USER_DEFINED 6000
|
||||
```
|
||||
|
||||
### Patch 4: IME Detection Functions (Lines 128-129)
|
||||
|
||||
**Added:**
|
||||
```c
|
||||
#define SCI_ISIMEOPEN 6003
|
||||
#define SCI_ISIMEMODECJK 6004
|
||||
```
|
||||
|
||||
### Patch 5: Strikethrough Style (Lines 270, 283)
|
||||
|
||||
**Added:**
|
||||
```c
|
||||
#define SCI_STYLESETSTRIKE 6001
|
||||
#define SCI_STYLEGETSTRIKE 6002
|
||||
```
|
||||
|
||||
### Patch 6: Regex Flag for Dot Match All (Line 540)
|
||||
|
||||
**Added:**
|
||||
```c
|
||||
#define SCFIND_DOT_MATCH_ALL 0x1000
|
||||
```
|
||||
|
||||
### Patch 7: Keyword Set Maximum (Autogenerated area)
|
||||
|
||||
**Changed:**
|
||||
```c
|
||||
// Upstream:
|
||||
#define KEYWORDSET_MAX 8
|
||||
|
||||
// NP3:
|
||||
#define KEYWORDSET_MAX 15
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Merge Strategy for Future Upgrades
|
||||
|
||||
1. **Start with upstream Scintilla.h**
|
||||
2. **Apply NP3 patches in order:**
|
||||
- Add DLL export block after `#ifndef SCINTILLA_H`
|
||||
- Update C++ header include
|
||||
- Add `SCI_DEV_USER_DEFINED`
|
||||
- Add IME detection defines
|
||||
- Add strikethrough style defines
|
||||
- Add `SCFIND_DOT_MATCH_ALL`
|
||||
- Change `KEYWORDSET_MAX` from 8 to 15
|
||||
3. **Verify ScintillaWin.cxx has matching implementations**
|
||||
|
||||
---
|
||||
|
||||
## Upgrade Steps
|
||||
|
||||
### Phase 1: Lexilla (CAREFUL - Has Customizations)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user