refactor
This commit is contained in:
@@ -36,17 +36,19 @@ public partial class SharpIdeCodeEdit : CodeEdit
|
|||||||
{
|
{
|
||||||
_popupMenu = GetNode<PopupMenu>("CodeFixesMenu");
|
_popupMenu = GetNode<PopupMenu>("CodeFixesMenu");
|
||||||
_popupMenu.IdPressed += OnCodeFixSelected;
|
_popupMenu.IdPressed += OnCodeFixSelected;
|
||||||
this.CodeCompletionRequested += OnCodeCompletionRequested;
|
CodeCompletionRequested += OnCodeCompletionRequested;
|
||||||
this.CodeFixesRequested += OnCodeFixesRequested;
|
CodeFixesRequested += OnCodeFixesRequested;
|
||||||
this.CaretChanged += () =>
|
CaretChanged += OnCaretChanged;
|
||||||
|
TextChanged += OnTextChanged;
|
||||||
|
SyntaxHighlighter = _syntaxHighlighter;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnCaretChanged()
|
||||||
{
|
{
|
||||||
_selectionStartCol = GetSelectionFromColumn();
|
_selectionStartCol = GetSelectionFromColumn();
|
||||||
_selectionEndCol = GetSelectionToColumn();
|
_selectionEndCol = GetSelectionToColumn();
|
||||||
_currentLine = GetCaretLine();
|
_currentLine = GetCaretLine();
|
||||||
GD.Print($"Selection changed to line {_currentLine}, start {_selectionStartCol}, end {_selectionEndCol}");
|
GD.Print($"Selection changed to line {_currentLine}, start {_selectionStartCol}, end {_selectionEndCol}");
|
||||||
};
|
|
||||||
TextChanged += OnTextChanged;
|
|
||||||
this.SyntaxHighlighter = _syntaxHighlighter;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnTextChanged()
|
private void OnTextChanged()
|
||||||
|
|||||||
Reference in New Issue
Block a user