This repository was archived by the owner on Jan 13, 2024. It is now read-only.
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
15
15
int GetSelectionLength ( ) ;
16
16
void AppendTextAndMoveCursor ( string text ) ;
17
17
void InsertTextAndMoveCursor ( string text ) ;
18
+ void SelectCurrentLine ( ) ;
19
+ void ClearSelectionToCursor ( ) ;
18
20
19
21
/// <summary>
20
22
/// 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)
43
43
GotoPos ( new Position ( currentPos . Value + text . Length ) ) ;
44
44
}
45
45
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
+
46
61
/// <summary>
47
62
/// Get the current line from the current position
48
63
/// </summary>
You can’t perform that action at this time.
0 commit comments