From 6cabe160c4878d3fc477046a1e6d6409b03eb634 Mon Sep 17 00:00:00 2001 From: Dave Schmenk Date: Mon, 16 Dec 2019 09:03:34 -0800 Subject: [PATCH] Fix empty line TABbing --- src/toolsrc/ed.pla | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/toolsrc/ed.pla b/src/toolsrc/ed.pla index 633d200..df651e2 100755 --- a/src/toolsrc/ed.pla +++ b/src/toolsrc/ed.pla @@ -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