File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ public class BNpp
8
8
{
9
9
public static NotepadPPGateway NotepadPP { get ; private set ; } = new NotepadPPGateway ( ) ;
10
10
11
+ public static ScintillaGateway Scintilla => new ScintillaGateway ( PluginBase . GetCurrentScintilla ( ) ) ;
12
+
11
13
/// <summary>
12
14
/// Récupère les caractères de fin de lignes courant
13
15
/// !!! Attention pour le moment bug. !!! Enlève la coloration syntaxique du fichier courant
@@ -17,14 +19,14 @@ public static string CurrentEOL
17
19
get
18
20
{
19
21
string eol = "\n " ;
20
- int value = Win32 . SendMessage ( PluginBase . nppData . _nppHandle , SciMsg . SCI_GETEOLMODE , 0 , 0 ) . ToInt32 ( ) ;
22
+ int value = Scintilla . GetEOLMode ( ) ;
21
23
22
- switch ( value )
24
+ switch ( ( SciMsg ) value )
23
25
{
24
- case 0 :
26
+ case SciMsg . SC_EOL_CRLF :
25
27
eol = "\r \n " ;
26
28
break ;
27
- case 1 :
29
+ case SciMsg . SC_EOL_CR :
28
30
eol = "\r " ;
29
31
break ;
30
32
default :
You can’t perform that action at this time.
0 commit comments