fix paste
This commit is contained in:
parent
d4a7f6fbc9
commit
0f02d48e65
|
@ -367,18 +367,19 @@ class SyntBlock(Synt):
|
||||||
self.rgsynt.remove(synt)
|
self.rgsynt.remove(synt)
|
||||||
|
|
||||||
def HandleKey(self, pwKey, pov, psel, key):
|
def HandleKey(self, pwKey, pov, psel, key):
|
||||||
|
synt = pwKey.pwChild.Value()
|
||||||
if ansi.FEnter(key):
|
if ansi.FEnter(key):
|
||||||
isyntInsert = self.rgsynt.index(pwKey.pwChild.Value()) + 1
|
isyntInsert = self.rgsynt.index(synt) + 1
|
||||||
self.InsertLineAt(isyntInsert)
|
self.InsertLineAt(isyntInsert)
|
||||||
clevelVert = psel.CLevelChild(pwKey.PwParent())
|
clevelVert = psel.CLevelChild(pwKey.PwParent())
|
||||||
pwVert = psel.PwSelected(pov.PwProjected(), clevelVert - 1)
|
pwVert = psel.PwSelected(pov.PwProjected(), clevelVert - 1)
|
||||||
psel.Inc(pwVert)
|
psel.Inc(pwVert)
|
||||||
elif (key == ansi.K_DEL or key == ansi.K_CTRL('x')) and pwKey.pwChild.RgpwChild()[0] == psel.PwSelected(pwKey):
|
elif (key == ansi.K_DEL or key == ansi.K_CTRL('x')) and pwKey.pwChild.RgpwChild()[0] == psel.PwSelected(pwKey):
|
||||||
self.RemoveLine(pwKey.pwChild.Value(), psel)
|
self.RemoveLine(synt, psel)
|
||||||
elif key == ansi.K_CTRL('c') and pwKey.pwChild.RgpwChild()[0] == psel.PwSelected(pwKey):
|
elif key == ansi.K_CTRL('c') and pwKey.pwChild.RgpwChild()[0] == psel.PwSelected(pwKey):
|
||||||
psel.syntClipboard = synt.DeepClone().WithParent(None)
|
psel.syntClipboard = synt.DeepClone().WithParent(None)
|
||||||
elif key == ansi.K_CTRL('v') and psel.syntClipboard:
|
elif key == ansi.K_CTRL('v') and psel.syntClipboard:
|
||||||
isyntInsert = self.rgsynt.index(pwKey.pwChild.Value())
|
isyntInsert = self.rgsynt.index(synt)
|
||||||
self.InsertLineAt(isyntInsert, psel.syntClipboard.DeepClone())
|
self.InsertLineAt(isyntInsert, psel.syntClipboard.DeepClone())
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in a new issue