From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12630 invoked from network); 29 Apr 2022 05:33:38 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 29 Apr 2022 05:33:38 -0000 Received: from asquith.prosimetrum.com ([125.236.209.157]) by 9front; Fri Apr 29 01:31:28 -0400 2022 Message-ID: Date: Fri, 29 Apr 2022 17:31:30 +1200 From: umbraticus@prosimetrum.com To: 9front@9front.org MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: overflow-preventing stateless wrapper browser singleton API Subject: [9front] sam patch to ignore autoindent in cmd window Reply-To: 9front@9front.org Precedence: bulk Things can get weird under sam -a if you type a command starting with whitespace. I think the best solution is probably just to ignore autoindent in the command window: diff 63f8dc808490ef038ce868eba62983290e38489d uncommitted --- a/sys/src/cmd/samterm/main.c +++ b/sys/src/cmd/samterm/main.c @@ -540,8 +540,7 @@ *p++ = ' '; } else *p++ = c; - if(autoindent) - if(c == '\n'){ + if(c == '\n' && autoindent && t != &cmd){ /* autoindent */ int cursor, ch; cursor = ctlu(&t->rasp, 0, a+(p-buf)-1);