acme: scrolling fixes + new home/end

Home and End previously navigated between
two different window locations: the top and
the bottom of the text.  Now they include a
third waypoint: the location where typing last
happened.  Thus, in a win window, typing
	ls -l
	<home>
scrolls to the beginning of the ls -l output.
A second <home> continues to the top of the file.

Makes Send scroll always, along with writes by
external programs to +Errors.

R=r
CC=mccoyst
http://codereview.appspot.com/4830051
This commit is contained in:
Russ Cox 2011-08-02 07:44:11 -04:00
parent 67afaf385a
commit 76864eb6cd
4 changed files with 32 additions and 5 deletions

View file

@ -960,8 +960,9 @@ sendx(Text *et, Text *t, Text *_0, int _1, int _2, Rune *_3, int _4)
if(textreadc(t, t->file->b.nc-1) != '\n'){
textinsert(t, t->file->b.nc, Lnl, 1, TRUE);
textsetselect(t, t->file->b.nc, t->file->b.nc);
textshow(t, t->q1, t->q1, 1);
}
t->iq1 = t->q1;
textshow(t, t->q1, t->q1, 1);
}
void