* [9front] sam patch to ignore autoindent in cmd window
@ 2022-04-29 5:31 umbraticus
2022-04-29 20:23 ` qwx
2022-04-30 23:03 ` qwx
0 siblings, 2 replies; 3+ messages in thread
From: umbraticus @ 2022-04-29 5:31 UTC (permalink / raw)
To: 9front
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);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [9front] sam patch to ignore autoindent in cmd window
2022-04-29 5:31 [9front] sam patch to ignore autoindent in cmd window umbraticus
@ 2022-04-29 20:23 ` qwx
2022-04-30 23:03 ` qwx
1 sibling, 0 replies; 3+ messages in thread
From: qwx @ 2022-04-29 20:23 UTC (permalink / raw)
To: 9front
On Fri Apr 29 07:32:22 +0200 2022, umbraticus@prosimetrum.com wrote:
> 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:
I'm very much in favor, this has bitten me a few times, esp. when
doing weird things with ^ _, etc.
Thanks,
qwx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [9front] sam patch to ignore autoindent in cmd window
2022-04-29 5:31 [9front] sam patch to ignore autoindent in cmd window umbraticus
2022-04-29 20:23 ` qwx
@ 2022-04-30 23:03 ` qwx
1 sibling, 0 replies; 3+ messages in thread
From: qwx @ 2022-04-30 23:03 UTC (permalink / raw)
To: 9front
Pushed. Thanks for the patch!
Cheers,
qwx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-30 23:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 5:31 [9front] sam patch to ignore autoindent in cmd window umbraticus
2022-04-29 20:23 ` qwx
2022-04-30 23:03 ` qwx
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).