9front - general discussion about 9front
 help / color / mirror / Atom feed
From: umbraticus@prosimetrum.com
To: 9front@9front.org
Subject: [9front] sam patch to ignore autoindent in cmd window
Date: Fri, 29 Apr 2022 17:31:30 +1200	[thread overview]
Message-ID: <F5D8FB35F1A883DEA4AF4103758606DB@prosimetrum.com> (raw)

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);


             reply	other threads:[~2022-04-29  5:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29  5:31 umbraticus [this message]
2022-04-29 20:23 ` qwx
2022-04-30 23:03 ` qwx

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F5D8FB35F1A883DEA4AF4103758606DB@prosimetrum.com \
    --to=umbraticus@prosimetrum.com \
    --cc=9front@9front.org \
    --subject='Re: [9front] sam patch to ignore autoindent in cmd window' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).