Index
diff --git a/docs_gen/PaneAPI.html b/docs_gen/PaneAPI.html
index 95d7644..cd24657 100644
--- a/docs_gen/PaneAPI.html
+++ b/docs_gen/PaneAPI.html
@@ -419,6 +419,12 @@ Annotations
editor:AnnotationClearAll ()
int editor.AnnotationVisible
int editor.AnnotationStyleOffset
+ End of Line Annotations
+ string editor.EOLAnnotationText [line line]
+ int editor.EOLAnnotationStyle [line line]
+ editor:EOLAnnotationClearAll ()
+ int editor.EOLAnnotationVisible
+ int editor.EOLAnnotationStyleOffset
Other settings
bool editor.BufferedDraw
+ position editor:BraceMatchNext (position pos, position startPos)
Tabs and Indentation Guides
int editor.TabMinimumWidth
int editor.TabWidth
@@ -472,7 +479,7 @@ Markers
colour editor.MarkerFore [int markerNumber] write-only
colour editor.MarkerBack [int markerNumber] write-only
colour editor.MarkerBackSelected [int markerNumber] write-only
- editor:MarkerEnableHighlight (bool enabled)
+ editor:MarkerEnableHighlight (bool enabled)
int editor.MarkerAlpha [int markerNumber] write-only
int editor:MarkerAdd (line line, int markerNumber)
editor:MarkerAddSet (line line, int markerSet)
@@ -481,8 +488,10 @@ Markers
int editor:MarkerGet (line line)
line editor:MarkerNext (line lineStart, int markerMask)
line editor:MarkerPrevious (line lineStart, int markerMask)
- int editor:MarkerLineFromHandle (int markerHandle)
+ line editor:MarkerLineFromHandle (int markerHandle)
editor:MarkerDeleteHandle (int markerHandle)
+ int editor:MarkerHandleFromLine (line line, int which)
+ int editor:MarkerNumberFromLine (line line, int which)
Indicators
int editor.IndicStyle [int indicator]
colour editor.IndicFore [int indicator]
@@ -498,8 +507,8 @@ Indicators
editor:IndicatorClearRange (position start, position lengthClear)
int editor:IndicatorAllOnFor (position pos)
int editor:IndicatorValueAt (int indicator, position pos)
- int editor:IndicatorStart (int indicator, position pos)
- int editor:IndicatorEnd (int indicator, position pos)
+ position editor:IndicatorStart (int indicator, position pos)
+ position editor:IndicatorEnd (int indicator, position pos)
editor:FindIndicatorShow (position start, position end)
editor:FindIndicatorFlash (position start, position end)
editor:FindIndicatorHide ()
@@ -548,7 +557,7 @@ Call tips
bool editor:CallTipActive ()
position editor:CallTipPosStart ()
position editor.CallTipPosStart write-only
- editor:CallTipSetHlt (int highlightStart, int highlightEnd)
+ editor:CallTipSetHlt (position highlightStart, position highlightEnd)
colour editor.CallTipBack write-only
colour editor.CallTipFore write-only
colour editor.CallTipForeHlt write-only
@@ -642,6 +651,7 @@ Long lines
colour editor.EdgeColour
editor:MultiEdgeAddLine (position column, colour edgeColour)
editor:MultiEdgeClearAll ()
+ position editor.MultiEdgeColumn [int which] read-only
Accessibility
int editor.Accessibility
Lexer
diff --git a/docs_gen/config.ld b/docs_gen/config.ld
index 76be235..c63718d 100644
--- a/docs_gen/config.ld
+++ b/docs_gen/config.ld
@@ -20,7 +20,7 @@ custom_see_handler('^(SCI_[%w_]+)$', function(name)
return name, url
end)
-project = 'LuaScript v0.10 '
+project = 'LuaScript v0.12 '
title = 'LuaScript Reference'
description = 'Notepad++ plugin for [Lua](http://www.lua.org/) scripting capabilities.'
full_description = [[LuaScript allows you to customize Notepad++.
diff --git a/scripts/Scintilla.iface b/scripts/Scintilla.iface
index 8107ae4..2c044d1 100644
--- a/scripts/Scintilla.iface
+++ b/scripts/Scintilla.iface
@@ -151,11 +151,17 @@ fun position GetStyledText=2015(, textrange tr)
fun bool CanRedo=2016(,)
# Retrieve the line number at which a particular marker is located.
-fun int MarkerLineFromHandle=2017(int markerHandle,)
+fun line MarkerLineFromHandle=2017(int markerHandle,)
# Delete a marker.
fun void MarkerDeleteHandle=2018(int markerHandle,)
+# Retrieve marker handles of a line
+fun int MarkerHandleFromLine=2732(line line, int which)
+
+# Retrieve marker number of a marker handle
+fun int MarkerNumberFromLine=2733(line line, int which)
+
# Is undo history being collected?
get bool GetUndoCollection=2019(,)
@@ -252,6 +258,12 @@ set void SetTabWidth=2036(int tabWidth,)
# Retrieve the visible size of a tab.
get int GetTabWidth=2121(,)
+# Set the minimum visual width of a tab.
+set void SetTabMinimumWidth=2724(int pixels,)
+
+# Get the minimum visual width of a tab.
+get int GetTabMinimumWidth=2725(,)
+
# Clear explicit tabstops on a line.
fun void ClearTabStops=2675(line line,)
@@ -276,9 +288,24 @@ val SC_IME_INLINE=1
# Is the IME displayed in a window or inline?
get IMEInteraction GetIMEInteraction=2678(,)
-# Choose to display the the IME in a winow or inline.
+# Choose to display the IME in a window or inline.
set void SetIMEInteraction=2679(IMEInteraction imeInteraction,)
+enu Alpha=SC_ALPHA_
+val SC_ALPHA_TRANSPARENT=0
+val SC_ALPHA_OPAQUE=255
+val SC_ALPHA_NOALPHA=256
+
+ali SC_ALPHA_NOALPHA=NO_ALPHA
+
+enu CursorShape=SC_CURSOR
+val SC_CURSORNORMAL=-1
+val SC_CURSORARROW=2
+val SC_CURSORWAIT=4
+val SC_CURSORREVERSEARROW=7
+
+ali SC_CURSORREVERSEARROW=REVERSE_ARROW
+
enu MarkerSymbol=SC_MARK_
val MARKER_MAX=31
val SC_MARK_CIRCLE=0
@@ -376,7 +403,7 @@ set void MarkerSetBack=2042(int markerNumber, colour back)
# Set the background colour used for a particular marker number when its folding block is selected.
set void MarkerSetBackSelected=2292(int markerNumber, colour back)
-# Enable/disable highlight for current folding bloc (smallest one that contains the caret)
+# Enable/disable highlight for current folding block (smallest one that contains the caret)
fun void MarkerEnableHighlight=2293(bool enabled,)
# Add a marker to a line, returning an ID which can be used to find or delete the marker.
@@ -1202,6 +1229,12 @@ set void SetTargetStart=2190(position start,)
# Get the position that starts the target.
get position GetTargetStart=2191(,)
+# Sets the virtual space of the target start
+set void SetTargetStartVirtualSpace=2728(position space,)
+
+# Get the virtual space of the target start
+get position GetTargetStartVirtualSpace=2729(,)
+
# Sets the position that ends the target which is used for updating the
# document without affecting the scroll position.
set void SetTargetEnd=2192(position end,)
@@ -1209,6 +1242,12 @@ set void SetTargetEnd=2192(position end,)
# Get the position that ends the target.
get position GetTargetEnd=2193(,)
+# Sets the virtual space of the target end
+set void SetTargetEndVirtualSpace=2730(position space,)
+
+# Get the virtual space of the target end
+get position GetTargetEndVirtualSpace=2731(,)
+
# Sets both the start and end of the target in one call.
fun void SetTargetRange=2686(position start, position end)
@@ -1261,7 +1300,7 @@ fun position CallTipPosStart=2203(,)
set void CallTipSetPosStart=2214(position posStart,)
# Highlight a segment of the definition.
-fun void CallTipSetHlt=2204(int highlightStart, int highlightEnd)
+fun void CallTipSetHlt=2204(position highlightStart, position highlightEnd)
# Set the background colour for the call tip.
set void CallTipSetBack=2205(colour back,)
@@ -1837,6 +1876,9 @@ fun void BraceBadLightIndicator=2499(bool useSetting, int indicator)
# The maxReStyle must be 0 for now. It may be defined in a future release.
fun position BraceMatch=2353(position pos, int maxReStyle)
+# Similar to BraceMatch, but matching starts at the explicit start position.
+fun position BraceMatchNext=2369(position pos, position startPos)
+
# Are the end of line characters visible?
get bool GetViewEOL=2355(,)
@@ -1886,6 +1928,9 @@ fun void MultiEdgeAddLine=2694(position column, colour edgeColour)
# Clear all vertical edges.
fun void MultiEdgeClearAll=2695(,)
+# Get multi edge positions.
+get position GetMultiEdgeColumn=2749(int which,)
+
# Sets the current caret position to be the search anchor.
fun void SearchAnchor=2366(,)
@@ -1973,14 +2018,6 @@ set void SetMouseWheelCaptures=2696(bool captures,)
# Get whether mouse wheel can be active outside the window.
get bool GetMouseWheelCaptures=2697(,)
-enu CursorShape=SC_CURSOR
-val SC_CURSORNORMAL=-1
-val SC_CURSORARROW=2
-val SC_CURSORWAIT=4
-val SC_CURSORREVERSEARROW=7
-
-ali SC_CURSORREVERSEARROW=REVERSE_ARROW
-
# Sets the cursor to one of the SC_CURSOR* values.
set void SetCursor=2386(CursorShape cursorType,)
# Get cursor type.
@@ -2007,6 +2044,7 @@ fun void WordPartRightExtend=2393(,)
enu VisiblePolicy=VISIBLE_
val VISIBLE_SLOP=0x01
val VISIBLE_STRICT=0x04
+
# Set the way the display area is determined when a particular line
# is to be moved to by Find, FindNext, GotoLine, etc.
fun void SetVisiblePolicy=2394(VisiblePolicy visiblePolicy, int visibleSlop)
@@ -2093,10 +2131,13 @@ get bool GetHotspotSingleLine=2497(,)
# Move caret down one paragraph (delimited by empty lines).
fun void ParaDown=2413(,)
+
# Extend selection down one paragraph (delimited by empty lines).
fun void ParaDownExtend=2414(,)
+
# Move caret up one paragraph (delimited by empty lines).
fun void ParaUp=2415(,)
+
# Extend selection up one paragraph (delimited by empty lines).
fun void ParaUpExtend=2416(,)
@@ -2283,12 +2324,6 @@ fun position EncodedFromUTF8=2449(string utf8, stringresult encoded)
# multi-byte characters. If beyond end of line, return line end position.
fun position FindColumn=2456(line line, position column)
-# Can the caret preferred x position only be changed by explicit movement commands?
-get CaretSticky GetCaretSticky=2457(,)
-
-# Stop the caret preferred x position changing when the user types.
-set void SetCaretSticky=2458(CaretSticky useCaretStickyBehaviour,)
-
enu CaretSticky=SC_CARETSTICKY_
val SC_CARETSTICKY_OFF=0
val SC_CARETSTICKY_ON=1
@@ -2296,6 +2331,12 @@ val SC_CARETSTICKY_WHITESPACE=2
ali SC_CARETSTICKY_WHITESPACE=WHITE_SPACE
+# Can the caret preferred x position only be changed by explicit movement commands?
+get CaretSticky GetCaretSticky=2457(,)
+
+# Stop the caret preferred x position changing when the user types.
+set void SetCaretSticky=2458(CaretSticky useCaretStickyBehaviour,)
+
# Switch between sticky and non-sticky: meant to be bound to a key.
fun void ToggleCaretSticky=2459(,)
@@ -2308,13 +2349,6 @@ get bool GetPasteConvertEndings=2468(,)
# Duplicate the selection. If selection empty duplicate the line containing the caret.
fun void SelectionDuplicate=2469(,)
-enu Alpha=SC_ALPHA_
-val SC_ALPHA_TRANSPARENT=0
-val SC_ALPHA_OPAQUE=255
-val SC_ALPHA_NOALPHA=256
-
-ali SC_ALPHA_NOALPHA=NO_ALPHA
-
# Set background alpha of the caret line.
set void SetCaretLineBackAlpha=2470(Alpha alpha,)
@@ -2361,10 +2395,10 @@ fun int IndicatorAllOnFor=2506(position pos,)
fun int IndicatorValueAt=2507(int indicator, position pos)
# Where does a particular indicator start?
-fun int IndicatorStart=2508(int indicator, position pos)
+fun position IndicatorStart=2508(int indicator, position pos)
# Where does a particular indicator end?
-fun int IndicatorEnd=2509(int indicator, position pos)
+fun position IndicatorEnd=2509(int indicator, position pos)
# Set number of entries in position cache
set void SetPositionCache=2514(int size,)
@@ -2572,18 +2606,25 @@ get int GetMainSelection=2575(,)
# Set the caret position of the nth selection.
set void SetSelectionNCaret=2576(int selection, position caret)
+
# Return the caret position of the nth selection.
get position GetSelectionNCaret=2577(int selection,)
+
# Set the anchor position of the nth selection.
set void SetSelectionNAnchor=2578(int selection, position anchor)
+
# Return the anchor position of the nth selection.
get position GetSelectionNAnchor=2579(int selection,)
+
# Set the virtual space of the caret of the nth selection.
set void SetSelectionNCaretVirtualSpace=2580(int selection, position space)
+
# Return the virtual space of the caret of the nth selection.
get position GetSelectionNCaretVirtualSpace=2581(int selection,)
+
# Set the virtual space of the anchor of the nth selection.
set void SetSelectionNAnchorVirtualSpace=2582(int selection, position space)
+
# Return the virtual space of the anchor of the nth selection.
get position GetSelectionNAnchorVirtualSpace=2583(int selection,)
@@ -2593,26 +2634,39 @@ set void SetSelectionNStart=2584(int selection, position anchor)
# Returns the position at the start of the selection.
get position GetSelectionNStart=2585(int selection,)
+# Returns the virtual space at the start of the selection.
+get position GetSelectionNStartVirtualSpace=2726(int selection,)
+
# Sets the position that ends the selection - this becomes the currentPosition.
set void SetSelectionNEnd=2586(int selection, position caret)
+# Returns the virtual space at the end of the selection.
+get position GetSelectionNEndVirtualSpace=2727(int selection,)
+
# Returns the position at the end of the selection.
get position GetSelectionNEnd=2587(int selection,)
# Set the caret position of the rectangular selection.
set void SetRectangularSelectionCaret=2588(position caret,)
+
# Return the caret position of the rectangular selection.
get position GetRectangularSelectionCaret=2589(,)
+
# Set the anchor position of the rectangular selection.
set void SetRectangularSelectionAnchor=2590(position anchor,)
+
# Return the anchor position of the rectangular selection.
get position GetRectangularSelectionAnchor=2591(,)
+
# Set the virtual space of the caret of the rectangular selection.
set void SetRectangularSelectionCaretVirtualSpace=2592(position space,)
+
# Return the virtual space of the caret of the rectangular selection.
get position GetRectangularSelectionCaretVirtualSpace=2593(,)
+
# Set the virtual space of the anchor of the rectangular selection.
set void SetRectangularSelectionAnchorVirtualSpace=2594(position space,)
+
# Return the virtual space of the anchor of the rectangular selection.
get position GetRectangularSelectionAnchorVirtualSpace=2595(,)
@@ -2628,6 +2682,7 @@ ali SCVS_NOWRAPLINESTART=NO_WRAP_LINE_START
# Set options for virtual space behaviour.
set void SetVirtualSpaceOptions=2596(VirtualSpace virtualSpaceOptions,)
+
# Return options for virtual space behaviour.
get VirtualSpace GetVirtualSpaceOptions=2597(,)
@@ -2788,6 +2843,38 @@ get int GetRepresentation=2666(string encodedCharacter, stringresult representat
# Remove a character representation.
fun void ClearRepresentation=2667(string encodedCharacter,)
+# Set the end of line annotation text for a line
+set void EOLAnnotationSetText=2740(line line, string text)
+
+# Get the end of line annotation text for a line
+get int EOLAnnotationGetText=2741(line line, stringresult text)
+
+# Set the style number for the end of line annotations for a line
+set void EOLAnnotationSetStyle=2742(line line, int style)
+
+# Get the style number for the end of line annotations for a line
+get int EOLAnnotationGetStyle=2743(line line,)
+
+# Clear the end of annotations from all lines
+fun void EOLAnnotationClearAll=2744(,)
+
+enu EOLAnnotationVisible=EOLANNOTATION_
+val EOLANNOTATION_HIDDEN=0
+val EOLANNOTATION_STANDARD=1
+val EOLANNOTATION_BOXED=2
+
+# Set the visibility for the end of line annotations for a view
+set void EOLAnnotationSetVisible=2745(EOLAnnotationVisible visible,)
+
+# Get the visibility for the end of line annotations for a view
+get EOLAnnotationVisible EOLAnnotationGetVisible=2746(,)
+
+# Get the start of the range of style numbers used for end of line annotations
+set void EOLAnnotationSetStyleOffset=2747(int style,)
+
+# Get the start of the range of style numbers used for end of line annotations
+get int EOLAnnotationGetStyleOffset=2748(,)
+
# Start notifying the container of all key presses and commands.
fun void StartRecord=3001(,)
@@ -2907,6 +2994,9 @@ fun int TagsOfStyle=4031(int style, stringresult tags)
# Result is NUL-terminated.
fun int DescriptionOfStyle=4032(int style, stringresult description)
+# Set the lexer from an ILexer*.
+set void SetILexer=4033(, pointer ilexer)
+
# Notifications
# Type of modification and the action which caused the modification.
# These are defined as a bit mask to make it easy to specify which notifications are wanted.
@@ -2935,7 +3025,8 @@ val SC_MOD_CONTAINER=0x40000
val SC_MOD_LEXERSTATE=0x80000
val SC_MOD_INSERTCHECK=0x100000
val SC_MOD_CHANGETABSTOPS=0x200000
-val SC_MODEVENTMASKALL=0x3FFFFF
+val SC_MOD_CHANGEEOLANNOTATION=0x400000
+val SC_MODEVENTMASKALL=0x7FFFFF
ali SC_MOD_INSERTTEXT=INSERT_TEXT
ali SC_MOD_DELETETEXT=DELETE_TEXT
@@ -2955,6 +3046,7 @@ ali SC_MOD_CHANGEANNOTATION=CHANGE_ANNOTATION
ali SC_MOD_LEXERSTATE=LEXER_STATE
ali SC_MOD_INSERTCHECK=INSERT_CHECK
ali SC_MOD_CHANGETABSTOPS=CHANGE_TAB_STOPS
+ali SC_MOD_CHANGEEOLANNOTATION=CHANGE_E_O_L_ANNOTATION
ali SC_MODEVENTMASKALL=EVENT_MASK_ALL
enu Update=SC_UPDATE_
@@ -3157,6 +3249,8 @@ val SCLEX_NIM=126
val SCLEX_CIL=127
val SCLEX_X12=128
val SCLEX_DATAFLEX=129
+val SCLEX_HOLLYWOOD=130
+val SCLEX_RAKU=131
# When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
# value assigned in sequence from SCLEX_AUTOMATIC+1.
@@ -3583,6 +3677,7 @@ val SCE_ERR_VALUE=21
val SCE_ERR_GCC_INCLUDED_FROM=22
val SCE_ERR_ESCSEQ=23
val SCE_ERR_ESCSEQ_UNKNOWN=24
+val SCE_ERR_GCC_EXCERPT=25
val SCE_ERR_ES_BLACK=40
val SCE_ERR_ES_RED=41
val SCE_ERR_ES_GREEN=42
@@ -5110,7 +5205,7 @@ val SCE_SAS_MACRO_KEYWORD=12
val SCE_SAS_BLOCK_KEYWORD=13
val SCE_SAS_MACRO_FUNCTION=14
val SCE_SAS_STATEMENT=15
-# Lexical states for SCLEX_NIM
+# Lexical states for SCLEX_NIM
lex Nim=SCLEX_NIM SCE_NIM_
val SCE_NIM_DEFAULT=0
val SCE_NIM_COMMENT=1
@@ -5170,6 +5265,54 @@ val SCE_DF_STRINGEOL=11
val SCE_DF_SCOPEWORD=12
val SCE_DF_OPERATOR=13
val SCE_DF_ICODE=14
+# Lexical states for SCLEX_HOLLYWOOD
+lex Hollywood=SCLEX_HOLLYWOOD SCE_HOLLYWOOD_
+val SCE_HOLLYWOOD_DEFAULT=0
+val SCE_HOLLYWOOD_COMMENT=1
+val SCE_HOLLYWOOD_COMMENTBLOCK=2
+val SCE_HOLLYWOOD_NUMBER=3
+val SCE_HOLLYWOOD_KEYWORD=4
+val SCE_HOLLYWOOD_STDAPI=5
+val SCE_HOLLYWOOD_PLUGINAPI=6
+val SCE_HOLLYWOOD_PLUGINMETHOD=7
+val SCE_HOLLYWOOD_STRING=8
+val SCE_HOLLYWOOD_STRINGBLOCK=9
+val SCE_HOLLYWOOD_PREPROCESSOR=10
+val SCE_HOLLYWOOD_OPERATOR=11
+val SCE_HOLLYWOOD_IDENTIFIER=12
+val SCE_HOLLYWOOD_CONSTANT=13
+val SCE_HOLLYWOOD_HEXNUMBER=14
+# Lexical states for SCLEX_RAKU
+lex Raku=SCLEX_RAKU SCE_RAKU_
+val SCE_RAKU_DEFAULT=0
+val SCE_RAKU_ERROR=1
+val SCE_RAKU_COMMENTLINE=2
+val SCE_RAKU_COMMENTEMBED=3
+val SCE_RAKU_POD=4
+val SCE_RAKU_CHARACTER=5
+val SCE_RAKU_HEREDOC_Q=6
+val SCE_RAKU_HEREDOC_QQ=7
+val SCE_RAKU_STRING=8
+val SCE_RAKU_STRING_Q=9
+val SCE_RAKU_STRING_QQ=10
+val SCE_RAKU_STRING_Q_LANG=11
+val SCE_RAKU_STRING_VAR=12
+val SCE_RAKU_REGEX=13
+val SCE_RAKU_REGEX_VAR=14
+val SCE_RAKU_ADVERB=15
+val SCE_RAKU_NUMBER=16
+val SCE_RAKU_PREPROCESSOR=17
+val SCE_RAKU_OPERATOR=18
+val SCE_RAKU_WORD=19
+val SCE_RAKU_FUNCTION=20
+val SCE_RAKU_IDENTIFIER=21
+val SCE_RAKU_TYPEDEF=22
+val SCE_RAKU_MU=23
+val SCE_RAKU_POSITIONAL=24
+val SCE_RAKU_ASSOCIATIVE=25
+val SCE_RAKU_CALLABLE=26
+val SCE_RAKU_GRAMMAR=27
+val SCE_RAKU_CLASS=28
# Events
diff --git a/src/Dialogs/ConsoleDialog.cpp b/src/Dialogs/ConsoleDialog.cpp
index e36634e..31c3651 100644
--- a/src/Dialogs/ConsoleDialog.cpp
+++ b/src/Dialogs/ConsoleDialog.cpp
@@ -108,7 +108,7 @@ INT_PTR CALLBACK ConsoleDialog::run_dlgProc(UINT message, WPARAM wParam, LPARAM
return FALSE;
case WM_SIZE: {
RECT rect = { 0, 0, LOWORD(lParam), HIWORD(lParam) };
- int h = min(m_sciInput.Call(SCI_GETLINECOUNT), 8) * m_sciInput.Call(SCI_TEXTHEIGHT, 1);
+ int h = static_cast(min(m_sciInput.Call(SCI_GETLINECOUNT), 8) * m_sciInput.Call(SCI_TEXTHEIGHT, 1));
MoveWindow((HWND)m_sciOutput.GetID(), 0, 0, rect.right, rect.bottom - h - 14, TRUE);
MoveWindow((HWND)m_sciInput.GetID(), 0, rect.bottom - h - 14, rect.right - 50, h + 9, TRUE);
m_sciOutput.Call(SCI_DOCUMENTEND);
@@ -169,16 +169,16 @@ INT_PTR CALLBACK ConsoleDialog::run_dlgProc(UINT message, WPARAM wParam, LPARAM
if (scn->linesAdded != 0) {
RECT rect;
GetClientRect(_hSelf, &rect);
- int h = min(m_sciInput.Call(SCI_GETLINECOUNT), 8) * m_sciInput.Call(SCI_TEXTHEIGHT, 1);
+ int h = static_cast(min(m_sciInput.Call(SCI_GETLINECOUNT), 8) * m_sciInput.Call(SCI_TEXTHEIGHT, 1));
MoveWindow((HWND)m_sciOutput.GetID(), 0, 0, rect.right, rect.bottom - h - 14, TRUE);
MoveWindow((HWND)m_sciInput.GetID(), 0, rect.bottom - h - 14, rect.right - 50, h + 9, TRUE);
m_sciOutput.Call(SCI_DOCUMENTEND);
}
// Not the most efficient way but by far the easiest to do it here
- int startLine = 0;
- int endLine = m_sciInput.Call(SCI_GETLINECOUNT);
- for (int i = startLine; i < endLine; ++i) {
+ intptr_t startLine = 0;
+ intptr_t endLine = m_sciInput.Call(SCI_GETLINECOUNT);
+ for (intptr_t i = startLine; i < endLine; ++i) {
m_sciInput.CallString(SCI_MARGINSETTEXT, i, ">");
m_sciInput.Call(SCI_MARGINSETSTYLE, i, STYLE_LINENUMBER);
}
@@ -299,8 +299,8 @@ LRESULT CALLBACK ConsoleDialog::inputWndProc(HWND hWnd, UINT uMsg, WPARAM wParam
}
void ConsoleDialog::runStatement() {
- int prevLastLine = m_sciOutput.Call(SCI_GETLINECOUNT);
- int newLastLine = 0;
+ intptr_t prevLastLine = m_sciOutput.Call(SCI_GETLINECOUNT);
+ intptr_t newLastLine = 0;
Sci_TextRange tr;
tr.chrg.cpMin = 0;
@@ -318,7 +318,7 @@ void ConsoleDialog::runStatement() {
newLastLine = m_sciOutput.Call(SCI_GETLINECOUNT);
- for (int i = prevLastLine; i < newLastLine; ++i) {
+ for (intptr_t i = prevLastLine; i < newLastLine; ++i) {
m_sciOutput.CallString(SCI_MARGINSETTEXT, i - 1, ">");
m_sciOutput.Call(SCI_MARGINSETSTYLE, i - 1, STYLE_LINENUMBER);
}
diff --git a/src/Lua.vcxproj b/src/Lua.vcxproj
index 314946b..d97f094 100644
--- a/src/Lua.vcxproj
+++ b/src/Lua.vcxproj
@@ -1,6 +1,10 @@
+
+ Debug
+ ARM64
+
Debug
Win32
@@ -9,6 +13,10 @@
Debug
x64
+
+ Release
+ ARM64
+
Release
Win32
@@ -22,29 +30,40 @@
{FCFBB3B0-8628-4CD0-A9B7-1BFB34E31E2A}
LuaScript
Win32Proj
- 10.0.17763.0
+ 10.0
DynamicLibrary
Unicode
- v141
+ v142
DynamicLibrary
Unicode
- v141
+ v142
+
+
+ DynamicLibrary
+ Unicode
+ v142
DynamicLibrary
Unicode
- v141
+ v142
true
DynamicLibrary
Unicode
- v141
+ v142
+ true
+
+
+ DynamicLibrary
+ Unicode
+ v142
true
@@ -58,6 +77,10 @@
+
+
+
+
@@ -66,6 +89,10 @@
+
+
+
+
<_ProjectFileVersion>10.0.30319.1
@@ -73,14 +100,20 @@
$(SolutionDir)bin\$(Configuration)_$(Platform)\build\$(ProjectName)\
true
$(SolutionDir)bin\$(Configuration)_$(Platform)\
+ $(SolutionDir)bin\$(Configuration)_$(Platform)\
$(SolutionDir)bin\$(Configuration)_$(Platform)\build\$(ProjectName)\
+ $(SolutionDir)bin\$(Configuration)_$(Platform)\build\$(ProjectName)\
true
+ true
$(SolutionDir)bin\$(Configuration)_$(Platform)\
$(SolutionDir)bin\$(Configuration)_$(Platform)\build\$(ProjectName)\
false
$(SolutionDir)bin\$(Configuration)_$(Platform)\
+ $(SolutionDir)bin\$(Configuration)_$(Platform)\
$(SolutionDir)bin\$(Configuration)_$(Platform)\build\$(ProjectName)\
+ $(SolutionDir)bin\$(Configuration)_$(Platform)\build\$(ProjectName)\
false
+ false
.dll
@@ -88,12 +121,18 @@
.dll
+
+ .dll
+
.dll
.dll
+
+ .dll
+
%(AdditionalIncludeDirectories)
@@ -157,6 +196,38 @@
+
+
+ %(AdditionalIncludeDirectories)
+ WIN32;LUA_BUILD_AS_DLL;NDEBUG;_WINDOWS;_USRDLL;LuaScript_EXPORTS;__STDC_WANT_SECURE_LIB__=1;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+ MultiThreaded
+ Level3
+ ProgramDatabase
+ true
+ Size
+ true
+ MaxSpeed
+ Sync
+ true
+ CompileAsC
+
+
+
+
+ shlwapi.lib;%(AdditionalDependencies)
+ $(OutDir)$(ProjectName).dll
+ true
+ Windows
+ true
+ true
+ true
+ true
+
+
+
+
+
+
Disabled
@@ -203,6 +274,29 @@
true
+
+
+ Disabled
+ %(AdditionalIncludeDirectories)
+ WIN32;LUA_BUILD_AS_DLL;_DEBUG;_WINDOWS;_USRDLL;LuaScript_EXPORTS;__STDC_WANT_SECURE_LIB__=1;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+ EnableFastChecks
+ MultiThreadedDebug
+ Level3
+ ProgramDatabase
+ CompileAsC
+
+
+
+
+ shlwapi.lib;%(AdditionalDependencies)
+ $(OutDir)$(ProjectName).dll
+ true
+ $(OutDir)LuaScript.pdb
+ Windows
+ true
+ true
+
+
diff --git a/src/LuaConsole.cpp b/src/LuaConsole.cpp
index 82ebaea..ff5d700 100644
--- a/src/LuaConsole.cpp
+++ b/src/LuaConsole.cpp
@@ -90,7 +90,7 @@ static bool inline isBrace(int ch) {
return strchr("[]{}()", ch) != NULL;
}
-static std::string getRange(GUI::ScintillaWindow *sw, int start, int end) {
+static std::string getRange(GUI::ScintillaWindow *sw, intptr_t start, intptr_t end) {
if (end <= start) return std::string();
std::vector buffer(end - start + 1);
@@ -104,14 +104,14 @@ static std::string getRange(GUI::ScintillaWindow *sw, int start, int end) {
return std::string(buffer.begin(), buffer.end() - 1); // don't copy the null
}
-static std::string getWordAt(GUI::ScintillaWindow *sw, int pos) {
- int word_start = sw->Call(SCI_WORDSTARTPOSITION, pos, true);
- int word_end = sw->Call(SCI_WORDENDPOSITION, pos, true);
+static std::string getWordAt(GUI::ScintillaWindow *sw, intptr_t pos) {
+ intptr_t word_start = sw->Call(SCI_WORDSTARTPOSITION, pos, true);
+ intptr_t word_end = sw->Call(SCI_WORDENDPOSITION, pos, true);
return getRange(sw, word_start, word_end);
}
-static std::string getLuaIdentifierAt(GUI::ScintillaWindow *sw, int pos) {
- const int line = sw->Call(SCI_LINEFROMPOSITION);
+static std::string getLuaIdentifierAt(GUI::ScintillaWindow *sw, intptr_t pos) {
+ const intptr_t line = sw->Call(SCI_LINEFROMPOSITION);
Sci_TextToFind ttf = {
{
@@ -317,29 +317,29 @@ bool LuaConsole::processNotification(const SCNotification *scn) {
}
void LuaConsole::maintainIndentation() {
- int curPos = m_sciInput->Call(SCI_GETCURRENTPOS);
- int curLine = m_sciInput->Call(SCI_LINEFROMPOSITION, curPos);
- int prevIndent = m_sciInput->Call(SCI_GETLINEINDENTATION, curLine - 1);
+ intptr_t curPos = m_sciInput->Call(SCI_GETCURRENTPOS);
+ intptr_t curLine = m_sciInput->Call(SCI_LINEFROMPOSITION, curPos);
+ intptr_t prevIndent = m_sciInput->Call(SCI_GETLINEINDENTATION, curLine - 1);
m_sciInput->Call(SCI_SETLINEINDENTATION, curLine, prevIndent);
curPos = m_sciInput->Call(SCI_GETLINEINDENTPOSITION, curLine);
m_sciInput->Call(SCI_SETEMPTYSELECTION, curPos);
}
void LuaConsole::braceMatch() {
- int curPos = m_sciInput->Call(SCI_GETCURRENTPOS);
- int bracePos = INVALID_POSITION;
+ intptr_t curPos = m_sciInput->Call(SCI_GETCURRENTPOS);
+ intptr_t bracePos = INVALID_POSITION;
// Check on both sides
- if (isBrace(m_sciInput->Call(SCI_GETCHARAT, curPos - 1))) {
+ if (isBrace(static_cast(m_sciInput->Call(SCI_GETCHARAT, curPos - 1)))) {
bracePos = curPos - 1;
}
- else if (isBrace(m_sciInput->Call(SCI_GETCHARAT, curPos))) {
+ else if (isBrace(static_cast(m_sciInput->Call(SCI_GETCHARAT, curPos)))) {
bracePos = curPos;
}
// See if we are next to a brace
if (bracePos != INVALID_POSITION) {
- int otherPos = m_sciInput->Call(SCI_BRACEMATCH, bracePos, 0);
+ intptr_t otherPos = m_sciInput->Call(SCI_BRACEMATCH, bracePos, 0);
if (otherPos != INVALID_POSITION) {
m_sciInput->Call(SCI_BRACEHIGHLIGHT, bracePos, otherPos);
}
@@ -354,16 +354,16 @@ void LuaConsole::braceMatch() {
void LuaConsole::showAutoCompletion() {
std::string partialWord;
- int curPos = m_sciInput->Call(SCI_GETCURRENTPOS);
- int prevCh = m_sciInput->Call(SCI_GETCHARAT, curPos - 1);
+ intptr_t curPos = m_sciInput->Call(SCI_GETCURRENTPOS);
+ int prevCh = static_cast(m_sciInput->Call(SCI_GETCHARAT, curPos - 1));
// The cursor could be at the end of a partial word e.g. editor.Sty|
if (isalpha(prevCh) || prevCh == '_') {
partialWord = getWordAt(m_sciInput, curPos - 1);
// Back up past the partial word
- prevCh = m_sciInput->Call(SCI_GETCHARAT, curPos - 1 - partialWord.size());
- curPos = curPos - static_cast(partialWord.size());
+ prevCh = static_cast(m_sciInput->Call(SCI_GETCHARAT, curPos - 1 - partialWord.size()));
+ curPos = curPos - partialWord.size();
}
if (prevCh == '.' || prevCh == ':') {
diff --git a/src/LuaScript.cpp b/src/LuaScript.cpp
index 9730afd..55dc241 100644
--- a/src/LuaScript.cpp
+++ b/src/LuaScript.cpp
@@ -299,13 +299,13 @@ extern "C" __declspec(dllexport) void beNotified(SCNotification *notifyCode) {
// Copied from SciTE
GUI::ScintillaWindow wEditor;
wEditor.SetID(curScintilla);
- int lineEndStyled = wEditor.Call(SCI_LINEFROMPOSITION, wEditor.Call(SCI_GETENDSTYLED));
- int endStyled = wEditor.Call(SCI_POSITIONFROMLINE, lineEndStyled);
+ intptr_t lineEndStyled = wEditor.Call(SCI_LINEFROMPOSITION, wEditor.Call(SCI_GETENDSTYLED));
+ intptr_t endStyled = wEditor.Call(SCI_POSITIONFROMLINE, lineEndStyled);
StyleWriter styler(wEditor);
int styleStart = 0;
if (endStyled > 0) styleStart = styler.StyleAt(endStyled - 1);
- styler.SetCodePage(wEditor.Call(SCI_GETCODEPAGE));
- LuaExtension::Instance().OnStyle(endStyled, static_cast(notifyCode->position) - endStyled, styleStart, &styler);
+ styler.SetCodePage(static_cast(wEditor.Call(SCI_GETCODEPAGE)));
+ LuaExtension::Instance().OnStyle(endStyled, notifyCode->position - endStyled, styleStart, &styler);
styler.Flush();
break;
}
diff --git a/src/LuaScript.vcxproj b/src/LuaScript.vcxproj
index 48ca9ab..7932236 100644
--- a/src/LuaScript.vcxproj
+++ b/src/LuaScript.vcxproj
@@ -1,6 +1,10 @@
+
+ Debug
+ ARM64
+
Debug
Win32
@@ -9,6 +13,10 @@
Debug
x64
+
+ Release
+ ARM64
+
Release
Win32
@@ -22,29 +30,40 @@
{1590D7CD-7D3A-4AB7-A355-EE02F7FB987D}
LuaScript
Win32Proj
- 10.0.17763.0
+ 10.0
DynamicLibrary
Unicode
- v141
+ v142
DynamicLibrary
Unicode
- v141
+ v142
+
+
+ DynamicLibrary
+ Unicode
+ v142
DynamicLibrary
Unicode
- v141
+ v142
true
DynamicLibrary
Unicode
- v141
+ v142
+ true
+
+
+ DynamicLibrary
+ Unicode
+ v142
true
@@ -58,6 +77,10 @@
+
+
+
+
@@ -66,6 +89,10 @@
+
+
+
+
<_ProjectFileVersion>10.0.30319.1
@@ -73,21 +100,33 @@
$(SolutionDir)bin\$(Configuration)_$(Platform)\build\
true
$(SolutionDir)bin\$(Configuration)_$(Platform)\
+ $(SolutionDir)bin\$(Configuration)_$(Platform)\
$(SolutionDir)bin\$(Configuration)_$(Platform)\build\
+ $(SolutionDir)bin\$(Configuration)_$(Platform)\build\
true
+ true
$(SolutionDir)bin\$(Configuration)_$(Platform)\
$(SolutionDir)bin\$(Configuration)_$(Platform)\build\
false
$(SolutionDir)bin\$(Configuration)_$(Platform)\
+ $(SolutionDir)bin\$(Configuration)_$(Platform)\
$(SolutionDir)bin\$(Configuration)_$(Platform)\build\
+ $(SolutionDir)bin\$(Configuration)_$(Platform)\build\
false
+ false
$(ProjectName)
+
+ $(ProjectName)
+
$(ProjectName)
+
+ $(ProjectName)
+
.\SciTE;.\lua\src;.\Dialogs;.\Npp;.\Utilities;.\;%(AdditionalIncludeDirectories)
@@ -156,6 +195,41 @@
mkdir "C:\Program Files\Notepad++\plugins\LuaScript"
copy "$(TargetPath)" "C:\Program Files\Notepad++\plugins\LuaScript"
copy "$(OutDir)Lua.dll" "C:\Program Files\Notepad++\plugins\LuaScript"
+)
+
+
+
+
+ .\SciTE;.\lua\src;.\Dialogs;.\Npp;.\Utilities;.\;%(AdditionalIncludeDirectories)
+ WIN32_LEAN_AND_MEAN;WIN32;NDEBUG;_WINDOWS;_USRDLL;$(ProjectName)_EXPORTS;__STDC_WANT_SECURE_LIB__=1;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+ MultiThreaded
+ Level3
+ ProgramDatabase
+ true
+ Size
+ true
+ MaxSpeed
+ Sync
+ true
+ true
+
+
+ Lua.lib;shlwapi.lib;%(AdditionalDependencies)
+ $(OutDir)$(ProjectName).dll
+ true
+ Windows
+ true
+ true
+ true
+ true
+ $(OutDir)$(ProjectName).lib
+ $(SolutionDir)bin\$(Configuration)_$(Platform)\;%(AdditionalLibraryDirectories)
+
+
+ if EXIST "C:\Program Files\Notepad++\plugins\" (
+ mkdir "C:\Program Files\Notepad++\plugins\LuaScript"
+ copy "$(TargetPath)" "C:\Program Files\Notepad++\plugins\LuaScript"
+ copy "$(OutDir)Lua.dll" "C:\Program Files\Notepad++\plugins\LuaScript"
)
@@ -217,6 +291,36 @@
mkdir "C:\Program Files\Notepad++\plugins\LuaScript"
copy "$(TargetPath)" "C:\Program Files\Notepad++\plugins\LuaScript"
copy "$(OutDir)Lua.dll" "C:\Program Files\Notepad++\plugins\LuaScript"
+)
+
+
+
+
+ Disabled
+ .\SciTE;.\lua\src;.\Dialogs;.\Npp;.\Utilities;.\;%(AdditionalIncludeDirectories)
+ WIN32_LEAN_AND_MEAN;WIN32;_DEBUG;_WINDOWS;_USRDLL;$(ProjectName)_EXPORTS;__STDC_WANT_SECURE_LIB__=1;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+ EnableFastChecks
+ MultiThreadedDebug
+ Level3
+ ProgramDatabase
+ true
+
+
+ Lua.lib;shlwapi.lib;%(AdditionalDependencies)
+ $(OutDir)$(ProjectName).dll
+ true
+ $(OutDir)$(ProjectName).pdb
+ Windows
+ true
+ true
+ $(OutDir)$(ProjectName).lib
+ $(SolutionDir)bin\$(Configuration)_$(Platform)\;%(AdditionalLibraryDirectories)
+
+
+ if EXIST "C:\Program Files\Notepad++\plugins\" (
+ mkdir "C:\Program Files\Notepad++\plugins\LuaScript"
+ copy "$(TargetPath)" "C:\Program Files\Notepad++\plugins\LuaScript"
+ copy "$(OutDir)Lua.dll" "C:\Program Files\Notepad++\plugins\LuaScript"
)
diff --git a/src/Npp/Sci_Position.h b/src/Npp/Sci_Position.h
index abd0f34..88ad513 100644
--- a/src/Npp/Sci_Position.h
+++ b/src/Npp/Sci_Position.h
@@ -18,7 +18,7 @@ typedef ptrdiff_t Sci_Position;
typedef size_t Sci_PositionU;
// For Sci_CharacterRange which is defined as long to be compatible with Win32 CHARRANGE
-typedef long Sci_PositionCR;
+typedef intptr_t Sci_PositionCR;
#ifdef _WIN32
#define SCI_METHOD __stdcall
diff --git a/src/NppExtensionAPI.cpp b/src/NppExtensionAPI.cpp
index d28fa2d..7c8d4c4 100644
--- a/src/NppExtensionAPI.cpp
+++ b/src/NppExtensionAPI.cpp
@@ -39,7 +39,7 @@ sptr_t NppExtensionAPI::Send(NppExtensionAPI::Pane p, unsigned int msg, uptr_t w
return scis[p].Call(msg, wParam, lParam);
}
-char *NppExtensionAPI::Range(NppExtensionAPI::Pane p, int start, int end) {
+char *NppExtensionAPI::Range(NppExtensionAPI::Pane p, intptr_t start, intptr_t end) {
if (end <= start) return nullptr;
char *dest = new char[end - start + 1];
@@ -52,14 +52,14 @@ char *NppExtensionAPI::Range(NppExtensionAPI::Pane p, int start, int end) {
return dest;
}
-void NppExtensionAPI::Remove(NppExtensionAPI::Pane p, int start, int end) {
+void NppExtensionAPI::Remove(NppExtensionAPI::Pane p, intptr_t start, intptr_t end) {
if (end <= start) return;
- int deleteLength = end - start;
+ intptr_t deleteLength = end - start;
this->Send(p, SCI_DELETERANGE, start, deleteLength);
}
-void NppExtensionAPI::Insert(NppExtensionAPI::Pane p, int pos, const char *s) {
+void NppExtensionAPI::Insert(NppExtensionAPI::Pane p, intptr_t pos, const char *s) {
this->Send(p, SCI_INSERTTEXT, pos, reinterpret_cast(s));
}
diff --git a/src/NppExtensionAPI.h b/src/NppExtensionAPI.h
index c840820..fb98dbe 100644
--- a/src/NppExtensionAPI.h
+++ b/src/NppExtensionAPI.h
@@ -61,9 +61,9 @@ class NppExtensionAPI final {
Pane getCurrentPane();
sptr_t Send(Pane p, unsigned int msg, uptr_t wParam = 0, sptr_t lParam = 0);
- char *Range(Pane p, int start, int end);
- void Remove(Pane p, int start, int end);
- void Insert(Pane p, int pos, const char *s);
+ char *Range(Pane p, intptr_t start, intptr_t end);
+ void Remove(Pane p, intptr_t start, intptr_t end);
+ void Insert(Pane p, intptr_t pos, const char *s);
void SetTextDirection(Pane p, bool rtl);
void Trace(const char *s);
void TraceError(const char *s);
diff --git a/src/SciIFaceTable.cpp b/src/SciIFaceTable.cpp
index 339a557..07bedd4 100644
--- a/src/SciIFaceTable.cpp
+++ b/src/SciIFaceTable.cpp
@@ -41,6 +41,9 @@ static std::vector ifaceConstants = {
{ "EDGE_LINE", 1 },
{ "EDGE_MULTILINE", 3 },
{ "EDGE_NONE", 0 },
+ { "EOLANNOTATION_BOXED", 2 },
+ { "EOLANNOTATION_HIDDEN", 0 },
+ { "EOLANNOTATION_STANDARD", 1 },
{ "INDICATOR_CONTAINER", 8 },
{ "INDICATOR_IME", 32 },
{ "INDICATOR_IME_MAX", 35 },
@@ -630,6 +633,7 @@ static std::vector ifaceConstants = {
{ "SCE_ERR_ES_WHITE", 55 },
{ "SCE_ERR_ES_YELLOW", 51 },
{ "SCE_ERR_GCC", 2 },
+ { "SCE_ERR_GCC_EXCERPT", 25 },
{ "SCE_ERR_GCC_INCLUDED_FROM", 22 },
{ "SCE_ERR_IFC", 16 },
{ "SCE_ERR_IFORT", 17 },
@@ -819,6 +823,21 @@ static std::vector ifaceConstants = {
{ "SCE_HJ_STRINGEOL", 51 },
{ "SCE_HJ_SYMBOLS", 50 },
{ "SCE_HJ_WORD", 46 },
+ { "SCE_HOLLYWOOD_COMMENT", 1 },
+ { "SCE_HOLLYWOOD_COMMENTBLOCK", 2 },
+ { "SCE_HOLLYWOOD_CONSTANT", 13 },
+ { "SCE_HOLLYWOOD_DEFAULT", 0 },
+ { "SCE_HOLLYWOOD_HEXNUMBER", 14 },
+ { "SCE_HOLLYWOOD_IDENTIFIER", 12 },
+ { "SCE_HOLLYWOOD_KEYWORD", 4 },
+ { "SCE_HOLLYWOOD_NUMBER", 3 },
+ { "SCE_HOLLYWOOD_OPERATOR", 11 },
+ { "SCE_HOLLYWOOD_PLUGINAPI", 6 },
+ { "SCE_HOLLYWOOD_PLUGINMETHOD", 7 },
+ { "SCE_HOLLYWOOD_PREPROCESSOR", 10 },
+ { "SCE_HOLLYWOOD_STDAPI", 5 },
+ { "SCE_HOLLYWOOD_STRING", 8 },
+ { "SCE_HOLLYWOOD_STRINGBLOCK", 9 },
{ "SCE_HPA_CHARACTER", 110 },
{ "SCE_HPA_CLASSNAME", 114 },
{ "SCE_HPA_COMMENTLINE", 107 },
@@ -1403,6 +1422,35 @@ static std::vector ifaceConstants = {
{ "SCE_P_TRIPLEDOUBLE", 7 },
{ "SCE_P_WORD", 5 },
{ "SCE_P_WORD2", 14 },
+ { "SCE_RAKU_ADVERB", 15 },
+ { "SCE_RAKU_ASSOCIATIVE", 25 },
+ { "SCE_RAKU_CALLABLE", 26 },
+ { "SCE_RAKU_CHARACTER", 5 },
+ { "SCE_RAKU_CLASS", 28 },
+ { "SCE_RAKU_COMMENTEMBED", 3 },
+ { "SCE_RAKU_COMMENTLINE", 2 },
+ { "SCE_RAKU_DEFAULT", 0 },
+ { "SCE_RAKU_ERROR", 1 },
+ { "SCE_RAKU_FUNCTION", 20 },
+ { "SCE_RAKU_GRAMMAR", 27 },
+ { "SCE_RAKU_HEREDOC_Q", 6 },
+ { "SCE_RAKU_HEREDOC_QQ", 7 },
+ { "SCE_RAKU_IDENTIFIER", 21 },
+ { "SCE_RAKU_MU", 23 },
+ { "SCE_RAKU_NUMBER", 16 },
+ { "SCE_RAKU_OPERATOR", 18 },
+ { "SCE_RAKU_POD", 4 },
+ { "SCE_RAKU_POSITIONAL", 24 },
+ { "SCE_RAKU_PREPROCESSOR", 17 },
+ { "SCE_RAKU_REGEX", 13 },
+ { "SCE_RAKU_REGEX_VAR", 14 },
+ { "SCE_RAKU_STRING", 8 },
+ { "SCE_RAKU_STRING_Q", 9 },
+ { "SCE_RAKU_STRING_QQ", 10 },
+ { "SCE_RAKU_STRING_Q_LANG", 11 },
+ { "SCE_RAKU_STRING_VAR", 12 },
+ { "SCE_RAKU_TYPEDEF", 22 },
+ { "SCE_RAKU_WORD", 19 },
{ "SCE_RB_BACKTICKS", 18 },
{ "SCE_RB_CHARACTER", 7 },
{ "SCE_RB_CLASSNAME", 8 },
@@ -1897,6 +1945,14 @@ static std::vector ifaceConstants = {
{ "SCI_CALLTIPSETPOSSTART", 2214 },
{ "SCI_CALLTIPUSESTYLE", 2212 },
{ "SCI_DISTANCETOSECONDARYSTYLES", 4025 },
+ { "SCI_EOLANNOTATIONGETSTYLE", 2743 },
+ { "SCI_EOLANNOTATIONGETSTYLEOFFSET", 2748 },
+ { "SCI_EOLANNOTATIONGETTEXT", 2741 },
+ { "SCI_EOLANNOTATIONGETVISIBLE", 2746 },
+ { "SCI_EOLANNOTATIONSETSTYLE", 2742 },
+ { "SCI_EOLANNOTATIONSETSTYLEOFFSET", 2747 },
+ { "SCI_EOLANNOTATIONSETTEXT", 2740 },
+ { "SCI_EOLANNOTATIONSETVISIBLE", 2745 },
{ "SCI_FOLDDISPLAYTEXTGETSTYLE", 2707 },
{ "SCI_FOLDDISPLAYTEXTSETSTYLE", 2701 },
{ "SCI_GETACCESSIBILITY", 2703 },
@@ -1993,6 +2049,7 @@ static std::vector ifaceConstants = {
{ "SCI_GETMOUSESELECTIONRECTANGULARSWITCH", 2669 },
{ "SCI_GETMOUSEWHEELCAPTURES", 2697 },
{ "SCI_GETMOVEEXTENDSSELECTION", 2706 },
+ { "SCI_GETMULTIEDGECOLUMN", 2749 },
{ "SCI_GETMULTIPASTE", 2615 },
{ "SCI_GETMULTIPLESELECTION", 2564 },
{ "SCI_GETNAMEDSTYLES", 4029 },
@@ -2026,7 +2083,9 @@ static std::vector ifaceConstants = {
{ "SCI_GETSELECTIONNCARET", 2577 },
{ "SCI_GETSELECTIONNCARETVIRTUALSPACE", 2581 },
{ "SCI_GETSELECTIONNEND", 2587 },
+ { "SCI_GETSELECTIONNENDVIRTUALSPACE", 2727 },
{ "SCI_GETSELECTIONNSTART", 2585 },
+ { "SCI_GETSELECTIONNSTARTVIRTUALSPACE", 2726 },
{ "SCI_GETSELECTIONS", 2570 },
{ "SCI_GETSELECTIONSTART", 2143 },
{ "SCI_GETSELEOLFILLED", 2479 },
@@ -2038,10 +2097,13 @@ static std::vector ifaceConstants = {
{ "SCI_GETSUBSTYLESSTART", 4021 },
{ "SCI_GETTABDRAWMODE", 2698 },
{ "SCI_GETTABINDENTS", 2261 },
+ { "SCI_GETTABMINIMUMWIDTH", 2725 },
{ "SCI_GETTABWIDTH", 2121 },
{ "SCI_GETTAG", 2616 },
{ "SCI_GETTARGETEND", 2193 },
+ { "SCI_GETTARGETENDVIRTUALSPACE", 2731 },
{ "SCI_GETTARGETSTART", 2191 },
+ { "SCI_GETTARGETSTARTVIRTUALSPACE", 2729 },
{ "SCI_GETTARGETTEXT", 2687 },
{ "SCI_GETTECHNOLOGY", 2631 },
{ "SCI_GETTEXTLENGTH", 2183 },
@@ -2146,6 +2208,7 @@ static std::vector ifaceConstants = {
{ "SCI_SETIDENTIFIER", 2622 },
{ "SCI_SETIDENTIFIERS", 4024 },
{ "SCI_SETIDLESTYLING", 2692 },
+ { "SCI_SETILEXER", 4033 },
{ "SCI_SETIMEINTERACTION", 2679 },
{ "SCI_SETINDENT", 2122 },
{ "SCI_SETINDENTATIONGUIDES", 2132 },
@@ -2209,9 +2272,12 @@ static std::vector ifaceConstants = {
{ "SCI_SETSTATUS", 2382 },
{ "SCI_SETTABDRAWMODE", 2699 },
{ "SCI_SETTABINDENTS", 2260 },
+ { "SCI_SETTABMINIMUMWIDTH", 2724 },
{ "SCI_SETTABWIDTH", 2036 },
{ "SCI_SETTARGETEND", 2192 },
+ { "SCI_SETTARGETENDVIRTUALSPACE", 2730 },
{ "SCI_SETTARGETSTART", 2190 },
+ { "SCI_SETTARGETSTARTVIRTUALSPACE", 2728 },
{ "SCI_SETTECHNOLOGY", 2630 },
{ "SCI_SETUNDOCOLLECTION", 2012 },
{ "SCI_SETUSETABS", 2124 },
@@ -2331,6 +2397,7 @@ static std::vector ifaceConstants = {
{ "SCLEX_GAP", 81 },
{ "SCLEX_GUI4CLI", 58 },
{ "SCLEX_HASKELL", 68 },
+ { "SCLEX_HOLLYWOOD", 130 },
{ "SCLEX_HTML", 4 },
{ "SCLEX_IHEX", 118 },
{ "SCLEX_INDENT", 122 },
@@ -2377,6 +2444,7 @@ static std::vector ifaceConstants = {
{ "SCLEX_PUREBASIC", 67 },
{ "SCLEX_PYTHON", 2 },
{ "SCLEX_R", 86 },
+ { "SCLEX_RAKU", 131 },
{ "SCLEX_REBOL", 71 },
{ "SCLEX_REGISTRY", 115 },
{ "SCLEX_RUBY", 22 },
@@ -2583,10 +2651,11 @@ static std::vector ifaceConstants = {
{ "SC_MARK_VLINE", 9 },
{ "SC_MASK_FOLDERS", static_cast(0xFE000000) },
{ "SC_MAX_MARGIN", 4 },
- { "SC_MODEVENTMASKALL", 0x3FFFFF },
+ { "SC_MODEVENTMASKALL", 0x7FFFFF },
{ "SC_MOD_BEFOREDELETE", 0x800 },
{ "SC_MOD_BEFOREINSERT", 0x400 },
{ "SC_MOD_CHANGEANNOTATION", 0x20000 },
+ { "SC_MOD_CHANGEEOLANNOTATION", 0x400000 },
{ "SC_MOD_CHANGEFOLD", 0x8 },
{ "SC_MOD_CHANGEINDICATOR", 0x4000 },
{ "SC_MOD_CHANGELINESTATE", 0x8000 },
@@ -2708,10 +2777,11 @@ static std::vector ifaceFunctions = {
{ "BraceHighlight", 2351, iface_void, { iface_position, iface_position } },
{ "BraceHighlightIndicator", 2498, iface_void, { iface_bool, iface_int } },
{ "BraceMatch", 2353, iface_position, { iface_position, iface_int } },
+ { "BraceMatchNext", 2369, iface_position, { iface_position, iface_position } },
{ "CallTipActive", 2202, iface_bool, { iface_void, iface_void } },
{ "CallTipCancel", 2201, iface_void, { iface_void, iface_void } },
{ "CallTipPosStart", 2203, iface_position, { iface_void, iface_void } },
- { "CallTipSetHlt", 2204, iface_void, { iface_int, iface_int } },
+ { "CallTipSetHlt", 2204, iface_void, { iface_position, iface_position } },
{ "CallTipShow", 2200, iface_void, { iface_position, iface_string } },
{ "CanPaste", 2173, iface_bool, { iface_void, iface_void } },
{ "CanRedo", 2016, iface_bool, { iface_void, iface_void } },
@@ -2766,6 +2836,7 @@ static std::vector ifaceFunctions = {
{ "DocumentStart", 2316, iface_void, { iface_void, iface_void } },
{ "DocumentStartExtend", 2317, iface_void, { iface_void, iface_void } },
{ "DropSelectionN", 2671, iface_void, { iface_int, iface_void } },
+ { "EOLAnnotationClearAll", 2744, iface_void, { iface_void, iface_void } },
{ "EditToggleOvertype", 2324, iface_void, { iface_void, iface_void } },
{ "EmptyUndoBuffer", 2175, iface_void, { iface_void, iface_void } },
{ "EncodedFromUTF8", 2449, iface_position, { iface_string, iface_stringresult } },
@@ -2814,9 +2885,9 @@ static std::vector ifaceFunctions = {
{ "IndexPositionFromLine", 2714, iface_position, { iface_line, iface_int } },
{ "IndicatorAllOnFor", 2506, iface_int, { iface_position, iface_void } },
{ "IndicatorClearRange", 2505, iface_void, { iface_position, iface_position } },
- { "IndicatorEnd", 2509, iface_int, { iface_int, iface_position } },
+ { "IndicatorEnd", 2509, iface_position, { iface_int, iface_position } },
{ "IndicatorFillRange", 2504, iface_void, { iface_position, iface_position } },
- { "IndicatorStart", 2508, iface_int, { iface_int, iface_position } },
+ { "IndicatorStart", 2508, iface_position, { iface_int, iface_position } },
{ "IndicatorValueAt", 2507, iface_int, { iface_int, iface_position } },
{ "InsertText", 2003, iface_void, { iface_position, iface_string } },
{ "IsRangeWord", 2691, iface_bool, { iface_position, iface_position } },
@@ -2860,8 +2931,10 @@ static std::vector ifaceFunctions = {
{ "MarkerDeleteHandle", 2018, iface_void, { iface_int, iface_void } },
{ "MarkerEnableHighlight", 2293, iface_void, { iface_bool, iface_void } },
{ "MarkerGet", 2046, iface_int, { iface_line, iface_void } },
- { "MarkerLineFromHandle", 2017, iface_int, { iface_int, iface_void } },
+ { "MarkerHandleFromLine", 2732, iface_int, { iface_line, iface_int } },
+ { "MarkerLineFromHandle", 2017, iface_line, { iface_int, iface_void } },
{ "MarkerNext", 2047, iface_line, { iface_line, iface_int } },
+ { "MarkerNumberFromLine", 2733, iface_int, { iface_line, iface_int } },
{ "MarkerPrevious", 2048, iface_line, { iface_line, iface_int } },
{ "MarkerSymbolDefined", 2529, iface_int, { iface_int, iface_void } },
{ "MoveCaretInsideView", 2401, iface_void, { iface_void, iface_void } },
@@ -3058,6 +3131,10 @@ static std::vector ifaceProperties = {
{ "DistanceToSecondaryStyles", 4025, 0, iface_int, iface_void },
{ "DocPointer", 2357, 2358, iface_pointer, iface_void },
{ "DocumentOptions", 2379, 0, iface_int, iface_void },
+ { "EOLAnnotationStyle", 2743, 2742, iface_int, iface_line },
+ { "EOLAnnotationStyleOffset", 2748, 2747, iface_int, iface_void },
+ { "EOLAnnotationText", 2741, 2740, iface_stringresult, iface_line },
+ { "EOLAnnotationVisible", 2746, 2745, iface_int, iface_void },
{ "EOLMode", 2030, 2031, iface_int, iface_void },
{ "EdgeColour", 2364, 2365, iface_colour, iface_void },
{ "EdgeColumn", 2360, 2361, iface_position, iface_void },
@@ -3079,6 +3156,7 @@ static std::vector ifaceProperties = {
{ "HighlightGuide", 2135, 2134, iface_position, iface_void },
{ "HotspotActiveUnderline", 2496, 2412, iface_bool, iface_void },
{ "HotspotSingleLine", 2497, 2421, iface_bool, iface_void },
+ { "ILexer", 0, 4033, iface_pointer, iface_void },
{ "IMEInteraction", 2678, 2679, iface_int, iface_void },
{ "Identifier", 2623, 2622, iface_int, iface_void },
{ "Identifiers", 0, 4024, iface_string, iface_int },
@@ -3138,6 +3216,7 @@ static std::vector ifaceProperties = {
{ "MouseSelectionRectangularSwitch", 2669, 2668, iface_bool, iface_void },
{ "MouseWheelCaptures", 2697, 2696, iface_bool, iface_void },
{ "MoveExtendsSelection", 2706, 0, iface_bool, iface_void },
+ { "MultiEdgeColumn", 2749, 0, iface_position, iface_int },
{ "MultiPaste", 2615, 2614, iface_int, iface_void },
{ "MultipleSelection", 2564, 2563, iface_bool, iface_void },
{ "NamedStyles", 4029, 0, iface_int, iface_void },
@@ -3176,7 +3255,9 @@ static std::vector ifaceProperties = {
{ "SelectionNCaret", 2577, 2576, iface_position, iface_int },
{ "SelectionNCaretVirtualSpace", 2581, 2580, iface_position, iface_int },
{ "SelectionNEnd", 2587, 2586, iface_position, iface_int },
+ { "SelectionNEndVirtualSpace", 2727, 0, iface_position, iface_int },
{ "SelectionNStart", 2585, 2584, iface_position, iface_int },
+ { "SelectionNStartVirtualSpace", 2726, 0, iface_position, iface_int },
{ "SelectionStart", 2143, 2142, iface_position, iface_void },
{ "Selections", 2570, 0, iface_int, iface_void },
{ "Status", 2383, 2382, iface_int, iface_void },
@@ -3202,10 +3283,13 @@ static std::vector ifaceProperties = {
{ "SubStylesStart", 4021, 0, iface_int, iface_int },
{ "TabDrawMode", 2698, 2699, iface_int, iface_void },
{ "TabIndents", 2261, 2260, iface_bool, iface_void },
+ { "TabMinimumWidth", 2725, 2724, iface_int, iface_void },
{ "TabWidth", 2121, 2036, iface_int, iface_void },
{ "Tag", 2616, 0, iface_stringresult, iface_int },
{ "TargetEnd", 2193, 2192, iface_position, iface_void },
+ { "TargetEndVirtualSpace", 2731, 2730, iface_position, iface_void },
{ "TargetStart", 2191, 2190, iface_position, iface_void },
+ { "TargetStartVirtualSpace", 2729, 2728, iface_position, iface_void },
{ "TargetText", 2687, 0, iface_stringresult, iface_void },
{ "Technology", 2631, 2630, iface_int, iface_void },
{ "TextLength", 2183, 0, iface_position, iface_void },
diff --git a/src/SciTE/GUI.h b/src/SciTE/GUI.h
index dfb3886..97d16b6 100644
--- a/src/SciTE/GUI.h
+++ b/src/SciTE/GUI.h
@@ -153,7 +153,7 @@ class ScintillaWindow : public Window {
bool CanCall() const {
return wid && fn && ptr;
}
- int Call(unsigned int msg, uptr_t wParam=0, sptr_t lParam=0) {
+ intptr_t Call(unsigned int msg, uptr_t wParam=0, sptr_t lParam=0) {
switch (msg) {
case SCI_CREATEDOCUMENT:
case SCI_CREATELOADER:
@@ -170,7 +170,7 @@ class ScintillaWindow : public Window {
status = fn(ptr, SCI_GETSTATUS, 0, 0);
if (status > 0 && status < SC_STATUS_WARN_START)
throw ScintillaFailure(status);
- return static_cast(retVal);
+ return retVal;
}
sptr_t CallReturnPointer(unsigned int msg, uptr_t wParam=0, sptr_t lParam=0) {
sptr_t retVal = fn(ptr, msg, wParam, lParam);
@@ -179,10 +179,10 @@ class ScintillaWindow : public Window {
throw ScintillaFailure(status);
return retVal;
}
- int CallPointer(unsigned int msg, uptr_t wParam, void *s) {
+ intptr_t CallPointer(unsigned int msg, uptr_t wParam, void *s) {
return Call(msg, wParam, reinterpret_cast(s));
}
- int CallString(unsigned int msg, uptr_t wParam, const char *s) {
+ intptr_t CallString(unsigned int msg, uptr_t wParam, const char *s) {
return Call(msg, wParam, reinterpret_cast(s));
}
sptr_t Send(unsigned int msg, uptr_t wParam=0, sptr_t lParam=0);
diff --git a/src/SciTE/IFaceTable.h b/src/SciTE/IFaceTable.h
index 9fe1c38..3fb65a6 100644
--- a/src/SciTE/IFaceTable.h
+++ b/src/SciTE/IFaceTable.h
@@ -20,6 +20,7 @@
#pragma once
#include
+#include
enum IFaceType {
iface_void,
diff --git a/src/SciTE/LuaExtension.cpp b/src/SciTE/LuaExtension.cpp
index 7a17b56..1e143f6 100644
--- a/src/SciTE/LuaExtension.cpp
+++ b/src/SciTE/LuaExtension.cpp
@@ -646,8 +646,8 @@ static int cf_pane_textrange(lua_State *L) {
NppExtensionAPI::Pane p = check_pane_object(L, 1);
if (lua_gettop(L) >= 3) {
- int cpMin = static_cast(luaL_checkinteger(L, 2));
- int cpMax = static_cast(luaL_checkinteger(L, 3));
+ intptr_t cpMin = static_cast(luaL_checkinteger(L, 2));
+ intptr_t cpMax = static_cast(luaL_checkinteger(L, 3));
if (cpMax >= 0) {
char *range = host->Range(p, cpMin, cpMax);
@@ -668,7 +668,7 @@ static int cf_pane_textrange(lua_State *L) {
static int cf_pane_insert(lua_State *L) {
NppExtensionAPI::Pane p = check_pane_object(L, 1);
- int pos = (int)luaL_checkinteger(L, 2);
+ intptr_t pos = static_cast(luaL_checkinteger(L, 2));
const char *s = luaL_checkstring(L, 3);
host->Insert(p, pos, s);
return 0;
@@ -676,8 +676,8 @@ static int cf_pane_insert(lua_State *L) {
static int cf_pane_remove(lua_State *L) {
NppExtensionAPI::Pane p = check_pane_object(L, 1);
- int cpMin = static_cast(luaL_checkinteger(L, 2));
- int cpMax = static_cast(luaL_checkinteger(L, 3));
+ intptr_t cpMin = static_cast(luaL_checkinteger(L, 2));
+ intptr_t cpMax = static_cast(luaL_checkinteger(L, 3));
host->Remove(p, cpMin, cpMax);
return 0;
}
@@ -685,7 +685,7 @@ static int cf_pane_remove(lua_State *L) {
static int cf_pane_append(lua_State *L) {
NppExtensionAPI::Pane p = check_pane_object(L, 1);
const char *s = luaL_checkstring(L, 2);
- host->Insert(p, static_cast(host->Send(p, SCI_GETLENGTH, 0, 0)), s);
+ host->Insert(p, host->Send(p, SCI_GETLENGTH, 0, 0), s);
return 0;
}
@@ -719,17 +719,17 @@ static int cf_pane_findtext(lua_State *L) {
if (!hasError) {
if (nArgs > 3) {
- ft.chrg.cpMin = static_cast(luaL_checkinteger(L, 4));
+ ft.chrg.cpMin = static_cast(luaL_checkinteger(L, 4));
hasError = (lua_gettop(L) > nArgs);
}
}
if (!hasError) {
if (nArgs > 4) {
- ft.chrg.cpMax = static_cast(luaL_checkinteger(L, 5));
+ ft.chrg.cpMax = static_cast(luaL_checkinteger(L, 5));
hasError = (lua_gettop(L) > nArgs);
} else {
- ft.chrg.cpMax = static_cast(host->Send(p, SCI_GETLENGTH, 0, 0));
+ ft.chrg.cpMax = host->Send(p, SCI_GETLENGTH, 0, 0);
}
}
@@ -759,10 +759,10 @@ static int cf_pane_findtext(lua_State *L) {
struct PaneMatchObject {
NppExtensionAPI::Pane pane;
- int startPos;
- int endPos;
+ intptr_t startPos;
+ intptr_t endPos;
int flags; // this is really part of the state, but is kept here for convenience
- int endPosOrig; // has to do with preventing infinite loop on a 0-length match
+ intptr_t endPosOrig; // has to do with preventing infinite loop on a 0-length match
};
static int cf_match_replace(lua_State *L) {
@@ -786,7 +786,7 @@ static int cf_match_replace(lua_State *L) {
host->Send(pmo->pane, SCI_SETTARGETSTART, pmo->startPos, 0);
host->Send(pmo->pane, SCI_SETTARGETEND, pmo->endPos, 0);
host->Send(pmo->pane, SCI_REPLACETARGET, lua_rawlen(L, 2), SptrFromString(replacement));
- pmo->endPos = static_cast(host->Send(pmo->pane, SCI_GETTARGETEND, 0, 0));
+ pmo->endPos = host->Send(pmo->pane, SCI_GETTARGETEND, 0, 0);
return 0;
}
@@ -878,7 +878,7 @@ static int cf_pane_match(lua_State *L) {
if (nargs >= 3) {
pmo->flags = (int)luaL_checkinteger(L, 3);
if (nargs >= 4) {
- pmo->endPos = pmo->endPosOrig = (int)luaL_checkinteger(L, 4);
+ pmo->endPos = pmo->endPosOrig = (intptr_t)luaL_checkinteger(L, 4);
if (pmo->endPos < 0) {
raise_error(L, "Invalid argument 3 for :match. Positive number or zero expected.");
return 0;
@@ -921,7 +921,7 @@ static int cf_pane_match_generator(lua_State *L) {
return 0;
}
- int searchPos = pmo->endPos;
+ intptr_t searchPos = pmo->endPos;
if ((pmo->startPos == pmo->endPosOrig) && (pmo->endPos == pmo->endPosOrig)) {
// prevent infinite loop on zero-length match by stepping forward
searchPos++;
@@ -935,8 +935,8 @@ static int cf_pane_match_generator(lua_State *L) {
if (ft.chrg.cpMax > ft.chrg.cpMin) {
sptr_t result = host->Send(pmo->pane, SCI_FINDTEXT, static_cast(pmo->flags), SptrFromPointer(&ft));
if (result >= 0) {
- pmo->startPos = static_cast(ft.chrgText.cpMin);
- pmo->endPos = pmo->endPosOrig = static_cast(ft.chrgText.cpMax);
+ pmo->startPos = ft.chrgText.cpMin;
+ pmo->endPos = pmo->endPosOrig = ft.chrgText.cpMax;
lua_pushvalue(L, 2);
return 1;
}
@@ -1896,15 +1896,15 @@ void LuaExtension::CallShortcut(int id) {
// Similar to StyleContext class in Scintilla
struct StylingContext {
- unsigned int startPos;
- int lengthDoc;
+ uintptr_t startPos;
+ intptr_t lengthDoc;
int initStyle;
StyleWriter *styler;
- unsigned int endPos;
- unsigned int endDoc;
+ uintptr_t endPos;
+ uintptr_t endDoc;
- unsigned int currentPos;
+ uintptr_t currentPos;
bool atLineStart;
bool atLineEnd;
int state;
@@ -1920,43 +1920,43 @@ struct StylingContext {
}
void Colourize() {
- int end = currentPos - 1;
- if (end >= static_cast(endDoc))
- end = static_cast(endDoc)-1;
+ intptr_t end = currentPos - 1;
+ if (end >= static_cast(endDoc))
+ end = endDoc - 1;
styler->ColourTo(end, state);
}
static int Line(lua_State *L) {
StylingContext *context = Context(L);
- int position = (int)luaL_checkinteger(L, 2);
+ intptr_t position = (intptr_t)luaL_checkinteger(L, 2);
lua_pushinteger(L, context->styler->GetLine(position));
return 1;
}
static int CharAt(lua_State *L) {
StylingContext *context = Context(L);
- int position = (int)luaL_checkinteger(L, 2);
+ intptr_t position = (intptr_t)luaL_checkinteger(L, 2);
lua_pushinteger(L, context->styler->SafeGetCharAt(position));
return 1;
}
static int StyleAt(lua_State *L) {
StylingContext *context = Context(L);
- int position = (int)luaL_checkinteger(L, 2);
+ intptr_t position = (intptr_t)luaL_checkinteger(L, 2);
lua_pushinteger(L, context->styler->StyleAt(position));
return 1;
}
static int LevelAt(lua_State *L) {
StylingContext *context = Context(L);
- int line = (int)luaL_checkinteger(L, 2);
+ intptr_t line = (intptr_t)luaL_checkinteger(L, 2);
lua_pushinteger(L, context->styler->LevelAt(line));
return 1;
}
static int SetLevelAt(lua_State *L) {
StylingContext *context = Context(L);
- int line = (int)luaL_checkinteger(L, 2);
+ intptr_t line = (intptr_t)luaL_checkinteger(L, 2);
int level = (int)luaL_checkinteger(L, 3);
context->styler->SetLevel(line, level);
return 0;
@@ -1964,14 +1964,14 @@ struct StylingContext {
static int LineState(lua_State *L) {
StylingContext *context = Context(L);
- int line = (int)luaL_checkinteger(L, 2);
+ intptr_t line = (intptr_t)luaL_checkinteger(L, 2);
lua_pushinteger(L, context->styler->GetLineState(line));
return 1;
}
static int SetLineState(lua_State *L) {
StylingContext *context = Context(L);
- int line = (int)luaL_checkinteger(L, 2);
+ intptr_t line = (intptr_t)luaL_checkinteger(L, 2);
int stateOfLine = (int)luaL_checkinteger(L, 3);
context->styler->SetLineState(line, stateOfLine);
return 0;
@@ -1981,7 +1981,7 @@ struct StylingContext {
void GetNextChar() {
lenCurrent = lenNext;
lenNext = 1;
- int nextPos = currentPos + lenCurrent;
+ intptr_t nextPos = currentPos + lenCurrent;
unsigned char byteNext = static_cast(styler->SafeGetCharAt(nextPos));
unsigned int nextSlot = (cursorPos + 1) % 3;
memcpy(cursor[nextSlot], "\0\0\0\0\0\0\0\0", 8);
@@ -2018,7 +2018,7 @@ struct StylingContext {
(currentPos >= endPos);
}
- void StartStyling(unsigned int startPos_, unsigned int length, int initStyle_) {
+ void StartStyling(uintptr_t startPos_, uintptr_t length, int initStyle_) {
endDoc = styler->Length();
endPos = startPos_ + length;
if (endPos == endDoc)
@@ -2049,8 +2049,8 @@ struct StylingContext {
static int StartStyling(lua_State *L) {
StylingContext *context = Context(L);
- unsigned int startPosStyle = (int)luaL_checkinteger(L, 2);
- unsigned int lengthStyle = (int)luaL_checkinteger(L, 3);
+ uintptr_t startPosStyle = (uintptr_t)luaL_checkinteger(L, 2);
+ uintptr_t lengthStyle = (uintptr_t)luaL_checkinteger(L, 3);
int initialStyle = (int)luaL_checkinteger(L, 4);
context->StartStyling(startPosStyle, lengthStyle, initialStyle);
return 0;
@@ -2149,13 +2149,13 @@ struct StylingContext {
static int Token(lua_State *L) {
StylingContext *context = Context(L);
- int start = context->styler->GetStartSegment();
- int end = context->currentPos - 1;
- int len = end - start + 1;
+ intptr_t start = context->styler->GetStartSegment();
+ intptr_t end = context->currentPos - 1;
+ intptr_t len = end - start + 1;
if (len <= 0)
len = 1;
char *sReturn = new char[len + 1];
- for (int i = 0; i < len; i++) {
+ for (intptr_t i = 0; i < len; i++) {
sReturn[i] = context->styler->SafeGetCharAt(start + i);
}
sReturn[len] = '\0';
@@ -2187,7 +2187,7 @@ struct StylingContext {
}
};
-bool LuaExtension::OnStyle(unsigned int startPos, int lengthDoc, int initStyle, StyleWriter *styler) {
+bool LuaExtension::OnStyle(uintptr_t startPos, intptr_t lengthDoc, int initStyle, StyleWriter *styler) {
if (luaState) {
lua_pushstring(luaState, "Npp_Callbacks");
lua_gettable(luaState, LUA_REGISTRYINDEX);
diff --git a/src/SciTE/LuaExtension.h b/src/SciTE/LuaExtension.h
index b6e1d8e..ec805a9 100644
--- a/src/SciTE/LuaExtension.h
+++ b/src/SciTE/LuaExtension.h
@@ -55,7 +55,7 @@ class LuaExtension final {
void CallShortcut(int id);
// Scintilla callbacks
- bool OnStyle(unsigned int startPos, int lengthDoc, int initStyle, StyleWriter *styler);
+ bool OnStyle(uintptr_t startPos, intptr_t lengthDoc, int initStyle, StyleWriter *styler);
bool OnChar(const SCNotification *sc);
bool OnSavePointReached(const SCNotification *sc);
bool OnSavePointLeft(const SCNotification *sc);
diff --git a/src/SciTE/StyleWriter.cpp b/src/SciTE/StyleWriter.cpp
index fd9b8ed..0f18fd3 100644
--- a/src/SciTE/StyleWriter.cpp
+++ b/src/SciTE/StyleWriter.cpp
@@ -24,7 +24,7 @@ bool TextReader::InternalIsLeadByte(char ch) const {
return GUI::IsDBCSLeadByte(codePage, ch);
}
-void TextReader::Fill(int position) {
+void TextReader::Fill(intptr_t position) {
if (lenDoc == -1)
lenDoc = sw.Call(SCI_GETTEXTLENGTH, 0, 0);
startPos = position - slopSize;
@@ -48,30 +48,30 @@ bool TextReader::Match(int pos, const char *s) {
return true;
}
-int TextReader::StyleAt(int position) {
+int TextReader::StyleAt(intptr_t position) {
return static_cast(sw.Call(SCI_GETSTYLEAT, position, 0));
}
-int TextReader::GetLine(int position) {
+intptr_t TextReader::GetLine(intptr_t position) {
return sw.Call(SCI_LINEFROMPOSITION, position, 0);
}
-int TextReader::LineStart(int line) {
+intptr_t TextReader::LineStart(intptr_t line) {
return sw.Call(SCI_POSITIONFROMLINE, line, 0);
}
-int TextReader::LevelAt(int line) {
- return sw.Call(SCI_GETFOLDLEVEL, line, 0);
+int TextReader::LevelAt(intptr_t line) {
+ return static_cast(sw.Call(SCI_GETFOLDLEVEL, line, 0));
}
-int TextReader::Length() {
+intptr_t TextReader::Length() {
if (lenDoc == -1)
lenDoc = sw.Call(SCI_GETTEXTLENGTH, 0, 0);
return lenDoc;
}
-int TextReader::GetLineState(int line) {
- return sw.Call(SCI_GETLINESTATE, line);
+int TextReader::GetLineState(intptr_t line) {
+ return static_cast(sw.Call(SCI_GETLINESTATE, line));
}
StyleWriter::StyleWriter(GUI::ScintillaWindow &sw_) :
@@ -81,19 +81,19 @@ StyleWriter::StyleWriter(GUI::ScintillaWindow &sw_) :
styleBuf[0] = 0;
}
-int StyleWriter::SetLineState(int line, int state) {
- return sw.Call(SCI_SETLINESTATE, line, state);
+int StyleWriter::SetLineState(intptr_t line, int state) {
+ return static_cast(sw.Call(SCI_SETLINESTATE, line, state));
}
-void StyleWriter::StartAt(unsigned int start, char chMask) {
+void StyleWriter::StartAt(uintptr_t start, char chMask) {
sw.Call(SCI_STARTSTYLING, start, chMask);
}
-void StyleWriter::StartSegment(unsigned int pos) {
+void StyleWriter::StartSegment(uintptr_t pos) {
startSeg = pos;
}
-void StyleWriter::ColourTo(unsigned int pos, int chAttr) {
+void StyleWriter::ColourTo(uintptr_t pos, int chAttr) {
// Only perform styling if non empty range
if (pos != startSeg - 1) {
if (validLen + (pos - startSeg + 1) >= bufferSize)
@@ -102,7 +102,7 @@ void StyleWriter::ColourTo(unsigned int pos, int chAttr) {
// Too big for buffer so send directly
sw.Call(SCI_SETSTYLING, pos - startSeg + 1, chAttr);
} else {
- for (unsigned int i = startSeg; i <= pos; i++) {
+ for (uintptr_t i = startSeg; i <= pos; i++) {
styleBuf[validLen++] = static_cast(chAttr);
}
}
@@ -110,7 +110,7 @@ void StyleWriter::ColourTo(unsigned int pos, int chAttr) {
startSeg = pos+1;
}
-void StyleWriter::SetLevel(int line, int level) {
+void StyleWriter::SetLevel(intptr_t line, int level) {
sw.Call(SCI_SETFOLDLEVEL, line, level);
}
diff --git a/src/SciTE/StyleWriter.h b/src/SciTE/StyleWriter.h
index 440299a..9acb8e1 100644
--- a/src/SciTE/StyleWriter.h
+++ b/src/SciTE/StyleWriter.h
@@ -19,17 +19,17 @@ class TextReader {
* and retrieval overhead.
* @a slopSize positions the buffer before the desired position
* in case there is some backtracking. */
- enum {bufferSize=4000, slopSize=bufferSize/8};
+ enum : intptr_t {bufferSize=4000, slopSize=bufferSize/8};
char buf[bufferSize+1];
- int startPos;
- int endPos;
+ intptr_t startPos;
+ intptr_t endPos;
int codePage;
GUI::ScintillaWindow &sw;
- int lenDoc;
+ intptr_t lenDoc;
bool InternalIsLeadByte(char ch) const;
- void Fill(int position);
+ void Fill(intptr_t position);
public:
explicit TextReader(GUI::ScintillaWindow &sw_);
char operator[](int position) {
@@ -39,7 +39,7 @@ class TextReader {
return buf[position - startPos];
}
/** Safe version of operator[], returning a defined value for invalid position. */
- char SafeGetCharAt(int position, char chDefault=' ') {
+ char SafeGetCharAt(intptr_t position, char chDefault=' ') {
if (position < startPos || position >= endPos) {
Fill(position);
if (position < startPos || position >= endPos) {
@@ -56,12 +56,12 @@ class TextReader {
codePage = codePage_;
}
bool Match(int pos, const char *s);
- int StyleAt(int position);
- int GetLine(int position);
- int LineStart(int line);
- int LevelAt(int line);
- int Length();
- int GetLineState(int line);
+ int StyleAt(intptr_t position);
+ intptr_t GetLine(intptr_t position);
+ intptr_t LineStart(intptr_t line);
+ int LevelAt(intptr_t line);
+ intptr_t Length();
+ int GetLineState(intptr_t line);
};
// Adds methods needed to write styles and folding
@@ -72,17 +72,17 @@ class StyleWriter : public TextReader {
protected:
char styleBuf[bufferSize];
int validLen;
- unsigned int startSeg;
+ uintptr_t startSeg;
public:
explicit StyleWriter(GUI::ScintillaWindow &sw_);
void Flush();
- int SetLineState(int line, int state);
+ int SetLineState(intptr_t line, int state);
- void StartAt(unsigned int start, char chMask=31);
- unsigned int GetStartSegment() const { return startSeg; }
- void StartSegment(unsigned int pos);
- void ColourTo(unsigned int pos, int chAttr);
- void SetLevel(int line, int level);
+ void StartAt(uintptr_t start, char chMask=31);
+ uintptr_t GetStartSegment() const { return startSeg; }
+ void StartSegment(uintptr_t pos);
+ void ColourTo(uintptr_t pos, int chAttr);
+ void SetLevel(intptr_t line, int level);
};
#endif
diff --git a/src/Version.h b/src/Version.h
index 397ae52..88be569 100644
--- a/src/Version.h
+++ b/src/Version.h
@@ -16,6 +16,6 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#define VERSION_NUM 0,10,0,0
-#define VERSION_TEXT TEXT("0.10") // This must match the tag pushed on the server minus the "v"
+#define VERSION_NUM 0,12,0,0
+#define VERSION_TEXT TEXT("0.12") // This must match the tag pushed on the server minus the "v"
#define VERSION_STAGE TEXT("") // "alpha", "beta", ""