From c74af19505e4ceb5ed5b29fcb9f2e30284148c40 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Tue, 21 Jan 2020 08:39:26 -0800 Subject: [PATCH] Improve indenting on mis-aligned lines --- images/apple/PLASMA2-SYS.PO | Bin 143360 -> 143360 bytes images/apple/PLASMA2.2mg | Bin 819264 -> 819264 bytes src/toolsrc/ed.pla | 14 +++++++++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/images/apple/PLASMA2-SYS.PO b/images/apple/PLASMA2-SYS.PO index cbdfda2d11764f2fa02cce98f618e1567038f913..64396ce873706b4e5a687dbdd3460b2d79dd5cf1 100755 GIT binary patch delta 1994 zcmXBUdr*{B7{~E*mPJrBU||>7%e#z$Ac|p5cp1cOyd;7y@(u%X5otpr(P9uytL4qX zNn_NLHJdu4TZ36B4N0|LO3TqS9T_#t)QM2X3Dc3ZNmC>GqJMne^Lw86Jm=lnTVr>4 zV|REUDPoe_^rDbkqo;}B>WCzNM3O9(F9oZUQAe=~eRrtHqMS zn%=1Wg_RYH^LK{{Z+=?djNBTL8uGZ??9JB&-3g|8krt?zFnPtGz(}#!lPcOh6={Lt zcH#A8$vIKNE7sSGRGG>ShCHF7mG3yvYI-&U!Y zC40hz&=1%Lj`7Tv9Gzv#4Hx>V5uPD}P0jkiRBzNl89lK3Q76IiXtzu1C;a0}W#*8w zWc^9I=U1Vh^)D}#BV?I>TdABNyMpISWvoe7`frxY?K0qRULdE-CjZ$5GA%MN`t|Op zIc70G)Kf0>fIp%__OWyDLfM^uHc6Pul7*=WC$MUSFs(}wrVdn&q(6#vv@iwG6|_~# zN#Q;fh_x8IV}-E?LF~u3IEqgEj0?Dqd$B?Zt3^d)l+|L4w+dr2p2Kv^h6lxH#9C~^ z7Hqc)wUe1vavM4jwEB1;;Si3Z6K8M5S=K>>&9FC<9yGI=TL(14X_^jFnNhp&~` zj<4`F4&yjFaSrFvg&y2QFYe$T9-t4xE{s7Kibz;sgA;BfV>B|5iEK>6^LCMG zbg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~AK2v+e-e7yxrxLRW6sdi~ZNwhZ^epUC(NVSZiHIt&Z9;oMitiy}yyqpamCj z8Leo?P5gr{bmIZSdw2*p|BVQ8>tQ9vR6VvLC@c`suBI!W%o~tdG3JH}Bl;i+!3aTL LgjSEa5%$G@fqy^C diff --git a/src/toolsrc/ed.pla b/src/toolsrc/ed.pla index 2fc400d..6518e1a 100755 --- a/src/toolsrc/ed.pla +++ b/src/toolsrc/ed.pla @@ -1192,7 +1192,7 @@ def pastesel#0 fin end def indentsel#0 - byte indentstr[MAXLNLEN+1], l + byte indentstr[MAXLNLEN+1], j, l word firstsel, lastsel, i freesel @@ -1204,6 +1204,18 @@ def indentsel#0 indentstr[0] = l + 2 indentstr[1] = keyspace indentstr[2] = keyspace + // + // Align indent + // + for j = 3 to indentstr[0] + if indentstr[j] <> keyspace + if j & 1 == 0 + indentstr[0]-- + memcpy(@indentstr + 1, @indentstr + 2, indentstr[0]) + fin + break + fin + next delstr(txtlinbuf=>[i]) txtlinbuf=>[i] = newstr(@indentstr) flags = flags | changed