LineFromPosition() public static method

Returns the line that contains the document position specified.
public static LineFromPosition ( int position ) : int
position int The zero-based document character position.
return int
Ejemplo n.º 1
0
Archivo: Plug.cs Proyecto: devjerome/3P
 /// <summary>
 /// When the user click on the margin
 /// </summary>
 public static void OnSciMarginClick(SCNotification nc)
 {
     // click on the error margin
     if (nc.margin == FilesInfo.ErrorMarginNumber)
     {
         // if it's an error symbol that has been clicked, the error on the line will be cleared
         if (!FilesInfo.ClearLineErrors(Npp.LineFromPosition(nc.position)))
         {
             // if nothing has been cleared, we go to the next error position
             FilesInfo.GoToNextError(Npp.LineFromPosition(nc.position));
         }
     }
 }