aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acme/exec.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2011-08-02 07:44:11 -0400
committerRuss Cox <rsc@swtch.com>2011-08-02 07:44:11 -0400
commit76864eb6cd2759efd687f392ada4f1facbf06250 (patch)
treed85cc2325a5ece172f0575ae20b58943a19f0480 /src/cmd/acme/exec.c
parent67afaf385afa5a2bcc6b7640d7cec6cd5d17863e (diff)
downloadplan9port-76864eb6cd2759efd687f392ada4f1facbf06250.tar.gz
plan9port-76864eb6cd2759efd687f392ada4f1facbf06250.tar.bz2
plan9port-76864eb6cd2759efd687f392ada4f1facbf06250.zip
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
Diffstat (limited to 'src/cmd/acme/exec.c')
-rw-r--r--src/cmd/acme/exec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/acme/exec.c b/src/cmd/acme/exec.c
index ad4da001..8262be4a 100644
--- a/src/cmd/acme/exec.c
+++ b/src/cmd/acme/exec.c
@@ -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