Commit graph

46 commits

Author SHA1 Message Date
Russ Cox
3d6e5cb56a acme: preserve window position and selection during Get
Before, executing Get in a file rewound the window offset and
selection to the start of the file.

After this CL, Get preserves the window offset and selection,
where preserve is defined as "the same line number and rune
offset within the line". So if the window started at line 10
before and the selection was line 13 chars 5-7, then that
will still be true after Get, provided the new content is large
enough.

This should help the common situation of plumbing a
compiler error, realizing the window is out of date,
clicking Get, and then losing the positioning from the
plumb operation.
2017-11-02 12:01:14 -04:00
Russ Cox
67dbeee5fe acme: check file content before declaring file "modified since last read"
Bad remote file systems can change mtime unexpectedly,
and then there is the problem that git rebase and similar
operations like to change the files and then change them back,
modifying the mtimes but not the content.

Avoid spurious Put errors on both of those by checking file
content.

(False positive "modified since last read" make the real ones
difficult to notice.)
2017-10-10 13:51:24 -04:00
Russ Cox
b15fd97627 acme: implement Cmd-Shift-Z for Redo on Mac
Change-Id: Ie9332ed473609bd6ca156be0843dc5411cbf7b93
Reviewed-on: https://plan9port-review.googlesource.com/2941
Reviewed-by: Russ Cox <rsc@swtch.com>
2017-07-16 02:24:41 +00:00
Russ Cox
fff818fe87 libdraw, libframe, acme: fix, guard against inverted range in textsetselect
Credit to Roi Martin <jroi.martin@gmail.com> for noticing that
libdraw was being passed a negative string length and for finding the
sequence of keystrokes that make acme do it reproducibly.

Change-Id: If3f3d04a25c506175f740d3e887d5d83b5cd1bfe
Reviewed-on: https://plan9port-review.googlesource.com/1092
Reviewed-by: Russ Cox <rsc@swtch.com>
2014-12-02 01:18:40 +00:00
Russ Cox
50ababbd55 acme: fix bufread crash due to typing-point scrolling
Acme tracks the most recent typing insertion point and
the home and end keys stop there on their way
up to the top or down to the bottom of the file.
That point should be iq1, and it should be adjusted
properly so that it's always between 0 and t->file->b.nc inclusive.
(This is all code from an external contributor, years old at this
point but new since Plan 9.)

Somehow, sometimes iq1 ends up a little beyond b.nc,
and when passed to textbacknl it crashes acme in bufread.
I can't see how that can happen but if it does, avoid the crash.

It's tempting to pull the insertion point code out entirely
but this is a little less invasive and should fix things for now.

TBR=rsc
https://codereview.appspot.com/107730043
2014-06-03 00:16:48 -04:00
Russ Cox
113ea95f7b undo CL 69070045 / 8539a916d98a
This breaks ^C in win windows, as expected.
People use ^C, win expects and handles ^C,
so I don't think we can just take it away.

I've noticed that it is broken but assumed my ssh
was screwed up.

If you want to make WindowsKey+C,X,V do the
operations, by analogy with command+C,X,V
on Mac, that's fine with me.

««« original CL description
acme: copy/cut/paste with ctl+c,x,v

LGTM=rsc
R=rsc
CC=plan9port.codebot
https://codereview.appspot.com/69070045

»»»

TBR=rsc
CC=burns.ethan, r
https://codereview.appspot.com/96410045
2014-05-19 09:39:34 -04:00
Russ Cox
d213189122 acme: fix Get of dir in nameless window (thanks Colton Lewis)
TBR=r
https://codereview.appspot.com/89390043
2014-04-18 14:03:46 -04:00
Ethan Burns
4030a6c905 acme: copy/cut/paste with ctl+c,x,v
LGTM=rsc
R=rsc
CC=plan9port.codebot
https://codereview.appspot.com/69070045
2014-03-13 18:48:41 -04:00
Rob Pike
5a69e405fc acme: scroll a directory window when navigating if:
- the cursor is on the last line
        - the navigation would put the cursor over the tag of the following text

R=rsc
CC=smckean83
https://codereview.appspot.com/15280045
2013-10-22 16:47:48 -07:00
Sean McKean
81c30b5a75 acme: fix arrow near end of text
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5399050
2011-11-17 14:46:14 -05:00
David Jeannot
a287dbab23 devdraw: draft cocoa support
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/4974060
2011-09-06 10:10:43 -04:00
Russ Cox
da7e3a5d39 acme: fix iq1 adjust bug
R=rsc
http://codereview.appspot.com/4816066
2011-08-02 07:57:48 -04:00
Russ Cox
76864eb6cd 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
2011-08-02 07:44:11 -04:00
Russ Cox
daea2c7d50 acme: correct modified message after initial load; more detail in
message

http://codereview.appspot.com/123051
2009-09-25 01:43:54 -04:00
Russ Cox
4dbf255619 acme: htmlclick takes precedence over line click
http://codereview.appspot.com/116074
2009-09-11 14:54:43 -04:00
Russ Cox
e47d0a1e98 acme: angle bracket tag matching, for XML, HTML etc
http://codereview.appspot.com/98042
2009-07-26 15:05:07 -04:00
Russ Cox
cb92a1b41c acme: do not redraw body on every tag change
fixes #5
http://bitbucket.org/rsc/plan9port/issue/5/
http://groups.google.com/group/plan9port-dev/t/e679347ecaa05cff

http://codereview.appspot.com/95041
2009-07-15 02:11:02 -04:00
Russ Cox
4aad1a3258 merge 2009-04-30 07:29:24 -07:00
Russ Cox
a2db69c8bd acme: revise multiline tag code 2008-03-07 11:07:17 -05:00
Russ Cox
0cd1385d9f acme: fix directory resize bug 2008-03-07 07:47:54 -05:00
Russ Cox
cd5a73785d acme: add -m option and avoid looking in the mirror 2008-04-17 16:04:19 -04:00
rsc
97e4432344 better tick handling 2007-05-10 19:34:04 +00:00
rsc
cbeb0b26e4 Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
rsc
4ca53ff0e0 fix b1 c2 c3 c3 c2 c3 [sic] 2006-02-08 18:11:57 +00:00
rsc
8b9a1d4cfe add chord fix from plan 9 2006-02-06 23:10:48 +00:00
rsc
cd1d0ab0b5 more tweaks 2006-01-12 05:43:26 +00:00
rsc
f8dea3c178 add bigtags 2005-12-16 15:14:14 +00:00
rsc
33dc4226a8 Cleanup in preparation for multiline tags. 2005-10-31 18:39:19 +00:00
rsc
5544aaf99b use typecommit; use nil in place of 0 again 2005-03-18 19:33:50 +00:00
rsc
2a373ea419 month old bug fix from rob 2005-03-18 18:05:48 +00:00
rsc
2189e55cde dumb porting bugs 2004-12-27 16:57:41 +00:00
rsc
6d7fdb243c changes from plan 9 2004-12-27 01:16:26 +00:00
rsc
63853aa069 bug fix in Zerox arrow handling from rob 2004-10-17 00:12:14 +00:00
rsc
b9d0739c20 unused variable 2004-06-20 16:30:27 +00:00
rsc
64055489f6 fix scrolling 2004-06-20 16:29:19 +00:00
rsc
038aa0220a scrolling 2004-06-11 04:13:03 +00:00
rsc
c16f1f733b Buttons 4 and 5. 2004-06-09 14:01:43 +00:00
rsc
1a8f27c350 various bug fixes 2004-05-14 15:14:21 +00:00
rsc
aba09191af add rog's chording fix. 2004-04-16 05:11:34 +00:00
rsc
62c1415826 Let's try this - Dotfiles toggles listing of .* in directory listings. 2004-04-08 19:30:18 +00:00
rsc
25e0e4f334 . 2004-03-26 17:15:57 +00:00
rsc
be22ae2d07 SunOS can rot in hell. 2004-03-26 01:59:35 +00:00
rsc
8ad517944e Today's changes.
More changes.
2004-03-25 23:03:57 +00:00
rsc
5a8e63b2f0 Fighting the good fight.
Move libfmt, libutf into subdirectories of lib9.

Add poll-based socket i/o to libthread, so that we can
avoid using multiple procs when possible, thus removing
dependence on crappy pthreads implementations.

Convert samterm, acme to the single-proc libthread.

Bring libcomplete, acme up-to-date w.r.t. Plan 9 distribution.
2004-02-29 22:10:26 +00:00
rsc
c197370550 completion, pageup/pagedown 2004-02-09 19:32:18 +00:00
rsc
b3994ec5c7 More files related to user-level file servers.
Also add acme!
2003-12-11 17:50:28 +00:00