acme: allow typing '\n' in window tags

This commit is contained in:
mischief 2014-12-17 14:27:31 -08:00
parent f52e85826f
commit 84f45a4491

View file

@ -643,8 +643,6 @@ texttype(Text *t, Rune r)
Rune *rp;
Text *u;
if(t->what!=Body && r=='\n')
return;
nr = 1;
rp = &r;
switch(r){
@ -670,6 +668,7 @@ texttype(Text *t, Rune r)
n = 2*t->maxlines/3;
case_Down:
q0 = t->org+frcharofpt(t, Pt(t->r.min.x, t->r.min.y+n*t->font->height));
if(t->what == Body)
textsetorigin(t, q0, TRUE);
return;
case Kup:
@ -682,6 +681,7 @@ texttype(Text *t, Rune r)
n = 2*t->maxlines/3;
case_Up:
q0 = textbacknl(t, t->org, n);
if(t->what == Body)
textsetorigin(t, q0, TRUE);
return;
case Khome:
@ -776,7 +776,7 @@ texttype(Text *t, Rune r)
textfill(t->file->text[i]);
return;
case '\n':
if(t->w->autoindent){
if(t->what == Body && t->w->autoindent){
/* find beginning of previous line using backspace code */
nnb = textbswidth(t, 0x15); /* ^U case */
rp = runemalloc(nnb + 1);