Skip to content

Commit

Permalink
attempt to fix #38
Browse files Browse the repository at this point in the history
  • Loading branch information
lochidev committed Jan 20, 2025
1 parent d449924 commit f7b0e59
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,12 @@ public override async void OnAccessibilityEvent(AccessibilityEvent e)
string expansionStr = Text[0].ToString();
string og = expansionStr; //not modified
CheckAndUpdateCursorArgs(expansionStr, sendIfCursorFound: true, e);
var arr = expansionStr.Split(_separators, StringSplitOptions.RemoveEmptyEntries);
bool send = false;
bool storeOg = true;
var text = arr[^1];
int cursorPosition = e.Source.TextSelectionStart;
var textBeforeCursor = expansionStr[..cursorPosition];
var arr = textBeforeCursor.Split(_separators, StringSplitOptions.RemoveEmptyEntries);
var text = arr.Length > 0 ? arr[^1] : string.Empty;
if (previousOg == og)
{
return;
Expand Down

0 comments on commit f7b0e59

Please sign in to comment.