acme: allow typing '\n' in window tags
This commit is contained in:
parent
f52e85826f
commit
84f45a4491
1 changed files with 5 additions and 5 deletions
|
@ -643,8 +643,6 @@ texttype(Text *t, Rune r)
|
||||||
Rune *rp;
|
Rune *rp;
|
||||||
Text *u;
|
Text *u;
|
||||||
|
|
||||||
if(t->what!=Body && r=='\n')
|
|
||||||
return;
|
|
||||||
nr = 1;
|
nr = 1;
|
||||||
rp = &r;
|
rp = &r;
|
||||||
switch(r){
|
switch(r){
|
||||||
|
@ -670,7 +668,8 @@ texttype(Text *t, Rune r)
|
||||||
n = 2*t->maxlines/3;
|
n = 2*t->maxlines/3;
|
||||||
case_Down:
|
case_Down:
|
||||||
q0 = t->org+frcharofpt(t, Pt(t->r.min.x, t->r.min.y+n*t->font->height));
|
q0 = t->org+frcharofpt(t, Pt(t->r.min.x, t->r.min.y+n*t->font->height));
|
||||||
textsetorigin(t, q0, TRUE);
|
if(t->what == Body)
|
||||||
|
textsetorigin(t, q0, TRUE);
|
||||||
return;
|
return;
|
||||||
case Kup:
|
case Kup:
|
||||||
n = t->maxlines/3;
|
n = t->maxlines/3;
|
||||||
|
@ -682,7 +681,8 @@ texttype(Text *t, Rune r)
|
||||||
n = 2*t->maxlines/3;
|
n = 2*t->maxlines/3;
|
||||||
case_Up:
|
case_Up:
|
||||||
q0 = textbacknl(t, t->org, n);
|
q0 = textbacknl(t, t->org, n);
|
||||||
textsetorigin(t, q0, TRUE);
|
if(t->what == Body)
|
||||||
|
textsetorigin(t, q0, TRUE);
|
||||||
return;
|
return;
|
||||||
case Khome:
|
case Khome:
|
||||||
typecommit(t);
|
typecommit(t);
|
||||||
|
@ -776,7 +776,7 @@ texttype(Text *t, Rune r)
|
||||||
textfill(t->file->text[i]);
|
textfill(t->file->text[i]);
|
||||||
return;
|
return;
|
||||||
case '\n':
|
case '\n':
|
||||||
if(t->w->autoindent){
|
if(t->what == Body && t->w->autoindent){
|
||||||
/* find beginning of previous line using backspace code */
|
/* find beginning of previous line using backspace code */
|
||||||
nnb = textbswidth(t, 0x15); /* ^U case */
|
nnb = textbswidth(t, 0x15); /* ^U case */
|
||||||
rp = runemalloc(nnb + 1);
|
rp = runemalloc(nnb + 1);
|
||||||
|
|
Loading…
Reference in a new issue