aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acme/exec.c
Commit message (Collapse)AuthorAgeFilesLines
* acme: shift button 3 for reverse searchRuss Cox2024-06-151-3/+4
| | | | | An experiment. Let's see if it's any good. Also document the Mac conventions in devdraw(3).
* acme: clean up environment after execRuss Cox2024-04-061-0/+9
| | | | Make up for the lack of a real rfork(RFENVG).
* acme: fix extra print argsRuss Cox2021-09-281-2/+2
|
* acme: report close failure in Put, this time for sureRuss Cox2020-01-241-5/+5
| | | | Missed in 0b349f6f that Bterm is not closing fd.
* acme: report close failure during PutRuss Cox2019-12-191-2/+6
|
* acme: delete trailing spaces during Put in autoindent modeRuss Cox2019-05-171-41/+64
| | | | | | | Autoident mode is the leading cause of trailing spaces on lines. Remove them during Put to make various picky tools happier. The changes during Put are added as a separate entry to the file history, so that the first Undo after Put restores the spaces.
* acme: do not trim spaces during PutRuss Cox2019-04-191-4/+8
| | | | | | | The commit that introduced this was pushed accidentally. It is not a good idea to do this. (It breaks programs that think that a clean window means the body matches the on-disk file.)
* acme: drop trailing spaces during Put of auto-indent windowRuss Cox2019-02-011-3/+38
| | | | | | | | | | | Auto-indent mode leaves trailing spaces on blank lines as you type past them, so silently elide them from the window content as it gets written back to disk. Another option would be to remove them from the window entirely during Put, but they're actually nice to have while editing, and to date Put has never modified the window content.
* acme: fix some memory leaksXiao-Yong Jin2018-03-271-0/+1
|
* acme: preserve window position and selection during GetRuss Cox2017-11-021-0/+30
| | | | | | | | | | | | | | | | | 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.
* acme: free buf in checksha1Russ Cox2017-10-141-0/+1
| | | | Thanks to Lorenzo Beretta for noticing.
* acme: check file content before declaring file "modified since last read"Russ Cox2017-10-101-2/+35
| | | | | | | | | | | | | 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.)
* all: fix or silence all INSTALL warnings on macOSRuss Cox2017-01-061-1/+1
| | | | | | | | Should be a clean build now. Change-Id: Id3460371cb5e8d4071f8faa9c2aec870d213a067 Reviewed-on: https://plan9port-review.googlesource.com/2781 Reviewed-by: Russ Cox <rsc@swtch.com>
* acme: add log file in acme root directoryRuss Cox2014-04-301-2/+9
| | | | | | | | | | | | | | | | | | | Reading /mnt/acme/log reports a log of window create, put, and delete events, as they happen. It blocks until the next event is available. Example log output: 8 new /Users/rsc/foo.go 8 put /Users/rsc/foo.go 8 del /Users/rsc/foo.go This lets acme-aware programs react to file writes, for example compiling code, running a test, or updating an import block. TBR=r R=r https://codereview.appspot.com/89560044
* acme: add comment for aligned writesRuss Cox2014-04-191-0/+5
| | | | | TBR=r https://codereview.appspot.com/89510044
* acme: use buffered i/o to write fileRuss Cox2014-04-191-1/+16
| | | | | | | | | | | | | | | | | | | | | | | Bakul Shah has observed corrupted files being written when acme writes over osxfuse to sshfs to a remote file system. In one example we examined, acme is writing an 0xf03-byte file in two system calls, first an 0x806-byte write and then a 0x6fd-byte write. (0x806 is BUFSIZE/sizeof(Rune); this file has no multibyte UTF-8.) What actually ends up happening is that an 0x806-byte file is written: 0x000-0x6fd contains what should be 0x806-0xf03 0x6fd-0x7fa contains zeros 0x7fa-0x806 contains what should be 0x7fa-0x806 (correct!) The theory is that fuse or sshfs or perhaps the remote file server is mishandling the unaligned writes. acme does not seem to be at fault. Using bio here will make the writes align to 8K boundaries, avoiding the bugs in whatever underlying piece is broken. TBR=r https://codereview.appspot.com/89550043
* acme: execute commands with / using shellMarius Eriksen2013-09-061-1/+1
| | | | | | | | This allows commands in bin subdirectories. R=rsc CC=plan9port.codebot https://codereview.appspot.com/13254044
* acme: set $samfile (same as $%) during executionMarius Eriksen2012-11-251-0/+1
| | | | | | R=rsc CC=plan9port.codebot http://codereview.appspot.com/6854092
* acme: use threadspawnd to avoid changing "." of current processRuss Cox2012-10-221-29/+8
| | | | | R=rsc http://codereview.appspot.com/6736060
* acme: add $acmeshell to control execution shellMarius Eriksen2012-10-211-2/+8
| | | | | | R=rsc CC=plan9port.codebot http://codereview.appspot.com/6614056
* acme: scrolling fixes + new home/endRuss Cox2011-08-021-1/+2
| | | | | | | | | | | | | | | | | | | 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
* 9term, acme: autoscrollRuss Cox2011-04-271-0/+1
| | | | | | | | | | | | | | | | Ignore scroll/noscroll window setting. Instead, scroll when the write begins in or immediately after the displayed window content. In the new scrolling discipline, executing "Noscroll" is replaced by typing Page Up or using the mouse to scroll higher in the buffer, and executing "Scroll" is replaced by typing End or using the mouse to scroll to the bottom of the buffer. R=r, r2 http://codereview.appspot.com/4433060
* acme: attempt to fix Put mtime skew on NFSRuss Cox2010-03-181-0/+13
| | | | | R=r http://codereview.appspot.com/583043
* acme: correct modified message after initial load; more detail inRuss Cox2009-09-251-5/+5
| | | | | | message http://codereview.appspot.com/123051
* src: use whatis instead of whichMichael Teichgräber2009-07-081-1/+1
|
* acme: refresh window properly after Tab command (Fazlul Shahriar)Russ Cox2007-11-281-1/+1
|
* fix acme Snarf bug; change Indent to apply to all windowsrsc2007-06-151-16/+37
|
* Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms.rsc2006-04-011-3/+3
|
* stupid gccrsc2005-12-211-6/+6
|
* Cleanup in preparation for multiline tags.rsc2005-10-311-1/+1
|
* More thread names.rsc2005-09-261-0/+2
|
* add undocumented Abort builtinrsc2005-01-231-5/+27
|
* don't need to rename Fid anymorersc2005-01-041-4/+2
|
* change to use new thread libraryrsc2004-12-271-0/+1
|
* bug fix in Get from robrsc2004-11-011-0/+2
|
* change md argument to number etc. (which acted only as a flag)rsc2004-10-221-2/+2
| | | | | | | | | | to an actual flag. buffer underrun check in number add xdata file for exactly the addressed region save addr across opens
* autoindent fixes from robrsc2004-09-281-12/+25
|
* scrollingrsc2004-06-111-2/+3
|
* restore current directory after threadexec.rsc2004-05-151-7/+48
| | | | this is dodgy.
* various bug fixesrsc2004-05-141-1/+1
|
* no more Dotfilesrsc2004-04-251-17/+0
|
* undo the madness.rsc2004-04-211-2/+0
|
* $foo in tags - here only for reference.rsc2004-04-211-0/+2
|
* oldorg was bad idearsc2004-04-191-11/+0
|
* various little bug fixesrsc2004-04-191-0/+11
|
* Let's try this - Dotfiles toggles listing of .* in directory listings.rsc2004-04-081-0/+18
|
* SunOS can rot in hell.rsc2004-03-261-1/+1
|
* Today's changes.rsc2004-03-251-1/+3
| | | | More changes.
* Small tweaksrsc2004-03-211-0/+1
| | | | Lots of new code imported.
* Fighting the good fight.rsc2004-02-291-11/+63
| | | | | | | | | | | | 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.