diff --git a/scripting.py b/scripting.py index 24392cc..4e148a1 100644 --- a/scripting.py +++ b/scripting.py @@ -345,7 +345,7 @@ class SyntBlock(Synt): pcur.EndLine() def OnInsertNewLine(syntAfter, psel): self.InsertLineAfter(syntAfter, None) - psel.Inc(pcur.pwVert) # does nothing because we need to reproject + # psel.Inc(pcur.pwVert) # does nothing because we need to reproject PwButtonHidden(pcur.pwVert, "[insert new line]", None, OnInsertNewLine, pcur.dxindent) for syntLine in self.rgsynt: pwKey = PwKeyHandler(pcur.pwVert, self.HandleKey) @@ -371,11 +371,10 @@ class SyntBlock(Synt): def HandleKey(self, pwKey, pov, psel, key): if ansi.FEnter(key): self.InsertLineAfter(pwKey.pwChild.Value(), None) - psel.Inc(pwKey.PwParent()) return True elif key == ansi.K_DEL and pwKey.pwChild.RgpwChild()[0] == psel.PwSelected(pwKey): - psel.Inc(pwKey.PwParent()) self.RemoveLine(pwKey.pwChild.Value()) + return True return False def Eval(self, env):