File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Visual Studio Project Template C#/PluginInfrastructure Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ public interface IScintillaGateway
1515 int GetSelectionLength ( ) ;
1616 void AppendTextAndMoveCursor ( string text ) ;
1717 void InsertTextAndMoveCursor ( string text ) ;
18+ void SelectCurrentLine ( ) ;
19+ void ClearSelectionToCursor ( ) ;
1820
1921 /// <summary>
2022 /// Get the current line from the current position
Original file line number Diff line number Diff line change @@ -43,6 +43,21 @@ public void InsertTextAndMoveCursor(string text)
4343 GotoPos ( new Position ( currentPos . Value + text . Length ) ) ;
4444 }
4545
46+ public void SelectCurrentLine ( )
47+ {
48+ int line = GetCurrentLineNumber ( ) ;
49+ SetSelection ( PositionFromLine ( line ) . Value , PositionFromLine ( line + 1 ) . Value ) ;
50+ }
51+
52+ /// <summary>
53+ /// clears the selection without changing the position of the cursor
54+ /// </summary>
55+ public void ClearSelectionToCursor ( )
56+ {
57+ var pos = GetCurrentPos ( ) . Value ;
58+ SetSelection ( pos , pos ) ;
59+ }
60+
4661 /// <summary>
4762 /// Get the current line from the current position
4863 /// </summary>
You can’t perform that action at this time.
0 commit comments