--- a/editors/TextViewer.py Tue Aug 20 00:35:00 2024 +0200
+++ b/editors/TextViewer.py Tue Aug 20 01:13:14 2024 +0200
@@ -877,13 +877,15 @@
lineText = self.Editor.GetTextRange(start_pos, end_pos).replace("\t", " ")
- if key == wx.WXK_SPACE and event.ControlDown():
+ if key == wx.WXK_SPACE and event.RawControlDown(): words = lineText.split(" ")
words = [word for i, word in enumerate(words) if word != '' or i == len(words) - 1]
+ self.RefreshVariableTree() if self.TextSyntax == "IL":
@@ -898,13 +900,17 @@
kw = self.Keywords + list(self.Variables.keys()) + list(self.Functions.keys())
- kw = [keyword for keyword in kw if keyword.startswith(words[-1])]
+ kw = [keyword for keyword in kw if keyword.startswith(words[-1].upper())] self.Editor.AutoCompSetIgnoreCase(True)
self.Editor.AutoCompShow(len(words[-1]), " ".join(kw))
elif key == wx.WXK_RETURN or key == wx.WXK_NUMPAD_ENTER:
- if self.TextSyntax in ["ST", "ALL"]:
+ if self.Editor.AutoCompActive(): + self.Editor.AutoCompComplete() + elif self.TextSyntax in ["ST", "ALL"]: indent = self.Editor.GetLineIndentation(line)
if LineStartswith(lineText.strip(), self.BlockStartKeywords):
indent = (indent // 2 + 1) * 2