1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-07-08 09:28:57 +00:00

simplify indent/undent code

This commit is contained in:
David Schmenk 2019-12-17 08:11:07 -08:00
parent f937e8265e
commit 3ce76f7308

View File

@ -1438,30 +1438,24 @@ def editmode#0
is keytab
if flags & insmode
indentsel
else
undentsel
fin
if not (flags & selection)
cursoff
if not ^(txtlinbuf=>[cursrow])
curshpos((curscol + 2) & $FE)
if not ^(txtlinbuf=>[cursrow])
curshpos((curscol + 2) & $FE)
else
autoindent(txtlinbuf=>[cursrow])
fin
fin
curson
break
fin
break
is keydetab
is keydetab
undentsel
if not (flags & selection)
cursoff
if not ^(txtlinbuf=>[cursrow])
curshpos((curscol - 2) & $FFFE)
else
autoindent(txtlinbuf=>[cursrow])
fin
curson
cursoff
if not ^(txtlinbuf=>[cursrow])
curshpos((curscol - 2) & $FFFE)
else
autoindent(txtlinbuf=>[cursrow])
fin
curson
break
is keyctrly
flags = flags ^ insmode