Skip to content

Commit fef0b13

Browse files
Antonsieukrem
authored andcommitted
Add declaration of SCN_FOLDINGSTATECHANGED constant (#94)
Allow usage of constant names directly in Scintilla.call function
1 parent 1a799df commit fef0b13

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

deploy/jN/lib/Scintilla.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ require("User32.dll.js");
33
/**
44
* Creates new Scintilla wrapper for given scintilla window
55
* @param {HANDLE} handle of scintilla window (e.g. firstView.handle)
6-
*/
7-
function Scintilla(handle){
6+
*/
7+
function Scintilla(handle) {
88
this.Handle = handle;
99
}
1010

1111
/**
12-
* Collection of constants used by Scintilla. Take a look into scintilla documentation
13-
* to understand what they do. http://www.scintilla.org/ScintillaDoc.html
14-
*/
12+
* Collection of constants used by Scintilla.
13+
* @link http://www.scintilla.org/ScintillaDoc.html
14+
*/
1515
Scintilla.prototype.Const = {
1616
SCI_START : 2000
1717
,SCI_OPTIONAL_START : 3000
@@ -832,8 +832,14 @@ Scintilla.prototype.Const = {
832832
,SCN_AUTOCCANCELLED : 2025
833833
,SCN_AUTOCCHARDELETED : 2026
834834
,SCN_SCROLLED : 2080
835+
,SCN_FOLDINGSTATECHANGED : 2081
835836
};
836837

837838
Scintilla.prototype.Call = function(msg, lparam, wparam){
838-
return User32.SendMessageW(this.Handle, this.Const[msg], lparam, wparam);
839+
return User32.SendMessageW(
840+
this.Handle,
841+
this.Const[msg],
842+
this.Const[lparam] ? this.Const[lparam] : lparam,
843+
this.Const[wparam] ? this.Const[wparam] : wparam
844+
);
839845
}

0 commit comments

Comments
 (0)