Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit 5323bc5

Browse files
committed
Added GetCurrentLineNumber
1 parent f5bc7d2 commit 5323bc5

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Visual Studio Project Template C#/PluginInfrastructure/IScintillaGateway.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ public interface IScintillaGateway
2121
void AppendTextAndMoveCursor(string text);
2222
void InsertTextAndMoveCursor(string text);
2323

24+
/// <summary>
25+
/// Get the current line from the current position
26+
/// </summary>
27+
int GetCurrentLineNumber();
28+
2429

2530
/* ++Autogenerated -- start of section automatically generated from Scintilla.iface */
2631
/// <summary>Add text to the document at current position. (Scintilla feature 2001)</summary>

Visual Studio Project Template C#/PluginInfrastructure/ScintillaGateway.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ public void InsertTextAndMoveCursor(string text)
5252
GotoPos(new Position(currentPos.Value + text.Length));
5353
}
5454

55+
/// <summary>
56+
/// Get the current line from the current position
57+
/// </summary>
58+
public int GetCurrentLineNumber()
59+
{
60+
return LineFromPosition(GetCurrentPos());
61+
}
5562

5663
/* ++Autogenerated -- start of section automatically generated from Scintilla.iface */
5764
/// <summary>Add text to the document at current position. (Scintilla feature 2001)</summary>

0 commit comments

Comments
 (0)