diff --git a/Autocomplete/PowershellAutocomplete.cs b/Autocomplete/PowershellAutocomplete.cs
index f5c55c4..dd99c9c 100644
--- a/Autocomplete/PowershellAutocomplete.cs
+++ b/Autocomplete/PowershellAutocomplete.cs
@@ -45,7 +45,7 @@ public void Force()
}
}
- private void TryGenerateSuggestions()
+ private void TryGenerateSuggestions(int columnOffset = 0)
{
var host = (EditorTextView)HostControl;
var offset = 0;
@@ -80,7 +80,7 @@ private void TryGenerateSuggestions()
{
if (_suggestions != null)
{
- var word = GetCurrentWord();
+ var word = GetCurrentWord(columnOffset);
if (!System.String.IsNullOrEmpty(word))
{
Suggestions = _suggestions.Where(m => m.StartsWith(word, StringComparison.OrdinalIgnoreCase)).ToList().AsReadOnly();
@@ -103,11 +103,11 @@ private void TryGenerateSuggestions()
}
}
- public override void GenerateSuggestions()
+ public override void GenerateSuggestions(int columnOffset = 0)
{
try
{
- TryGenerateSuggestions();
+ TryGenerateSuggestions(columnOffset);
}
catch { }
}
@@ -119,12 +119,12 @@ public override bool IsWordChar(Rune rune)
}
///
- protected override string GetCurrentWord()
+ protected override string GetCurrentWord(int columnOffset = 0)
{
var host = (TextView)HostControl;
var currentLine = host.GetCurrentLine();
var cursorPosition = Math.Min(host.CurrentColumn, currentLine.Count);
- return IdxToWord(currentLine, cursorPosition);
+ return IdxToWord(currentLine, cursorPosition, columnOffset);
}
///
diff --git a/psedit.csproj b/psedit.csproj
index 88881b5..20f5fa6 100644
--- a/psedit.csproj
+++ b/psedit.csproj
@@ -6,7 +6,7 @@
-
+