1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-11-02 13:08:13 +00:00

Fix empty line TABbing

This commit is contained in:
Dave Schmenk 2019-12-16 09:03:34 -08:00
parent 454ecb29a8
commit 6cabe160c4

View File

@ -1147,7 +1147,7 @@ def indentsel#0
firstsel, lastsel = selrange
for i = firstsel to lastsel
l = ^(txtlinbuf=>[i])
if l < MAXLNLEN - 2
if l and l < MAXLNLEN - 2
memcpy(@indentstr + 3, txtlinbuf=>[i] + 1, l)
indentstr[0] = l + 2
indentstr[1] = keyspace
@ -1443,7 +1443,11 @@ def editmode#0
fin
if not (flags & selection)
cursoff
autoindent(txtlinbuf=>[cursrow])
if not ^(txtlinbuf=>[cursrow])
curshpos((curscol + 2) & $FE)
else
autoindent(txtlinbuf=>[cursrow])
fin
curson
fin
break