summaryrefslogtreecommitdiff
path: root/usr.bin/mg
AgeCommit message (Collapse)Author
2012-11-20keep functnames sortedFlorian Obser
ok jasper, lum
2012-11-13Column numbers are gone for good.Florian Obser
"yes" deraadt, input jmc
2012-11-11updating the character offset on the line all the time is astoundinglyTheo de Raadt
hostile to slow terminals. ok lum
2012-11-06Remove never read struct member, found while investigating a llvmFlorian Obser
report. ok lum, jasper, benno
2012-11-03fix potential memory leak, found by llvmFlorian Obser
ok haesbaert, lum, benno
2012-11-03kill dead assignment, found by llvmFlorian Obser
ok haesbaert, lum, benno
2012-11-03Don't leak a file descriptor when testing for permissions, also makeChristiano F. Haesbaert
sure directory is executable, otherwise we can't list it. Found by and original diff from RustyBSD. While here, strlen returns a size_t not an int. ok florian.
2012-11-03This should be void.Christiano F. Haesbaert
2012-10-26- fix potential memory and fd leakFlorian Obser
ok benno, lum
2012-10-23Use correct file for revert-buffer; do not ignore abort.Florian Obser
ok lum, jasper, benno
2012-10-22Add (r)evert prompt to "File changed on disk; really edit the buffer"Florian Obser
prompt. input, ok lum@, man bit ok jmc@, ok benno@
2012-10-22Check for dirty buffer on buffer change.Florian Obser
ok jasper@, benno@
2012-10-20- fix a potential double freeJasper Lievisse Adriaanse
ok florian@
2012-10-12- implement "revert-buffer", which reverts the current buffer to what's on diskJasper Lievisse Adriaanse
- split gotoline() into the argument handling part and the part that actually goes to the specified line number so it can be re-used by revertbuffer() input/ok florian@ haesbaert@
2012-09-25Stop the space char completing a file name. This mimics more recentlum
versions of emacs. kjell and jasper@ agree.
2012-09-07Make C-r not screw up the line counter if the pattern ends up notlum
matching. More goodness from Florian Obser. (and a tweak by me)
2012-08-31Allow an error message for a filename that is too long to be seen andlum
let the error stop mg exiting when C-x C-c is called.
2012-08-30oops. need to reset errno. Otherwise we can't save a new file in alum
directory where permissions are ok.
2012-08-30Some line counter goodness from Florian Obser.lum
If you open an already open buffer via C-x C-f, odd things can happen with the cursor and line counter for that buffer. This diff stops that behaviour and no regressions viewable.
2012-08-30This diff allows the user to decide what to do with buffers thatlum
experience write errors during C-x C-c (exiting mg). Emacs stops the exiting process when it encounters problem buffers and lets the user decide what to do, currently mg continues exiting and the contents of these buffers are lost. This diff bring mg more into line with emacs. Review and observations from Sunil Nimmagadda.
2012-08-28Make mg behave more like emacs with regards to opening a new buffer:lum
1. If parent directory is read-only, make buffer read-only. 2. If parent doesn't exist; give user a message and create buffer as readable. Reviewed by Sunil Nimmagadda. ok jasper@
2012-07-11fix three typos.Igor Sobrado
ok jmc@
2012-07-10Fix an outstanding debian bug: #658539lum
"looks good" kjell
2012-07-09OpenBSD has two kinds of developers ...Mike Larkin
ok beck@, guenther@ who deal with their own ... ok deraadt@ who deals with his own and sometimes others ...
2012-07-02Maintain mg's Public Domain license heritage.lum
Sunil Nimmagadda agrees.
2012-06-26It is time to bring this back alive.Claudio Jeker
2012-06-26add missing rcs idsJasper Lievisse Adriaanse
2012-06-21Shuffle leave-tmpdir-backups up to correct place in alphabetic order.lum
(the command name changed at one point from move-... -> leave-...)
2012-06-20make a list format more nicely; ok lumJason McIntyre
2012-06-19various small markup fixes; ok lumJason McIntyre
2012-06-18Add a BACKUP FILES section.lum
Suggested by jmc@ He will review further.
2012-06-18Add ~/.mg.d to FILES. Reviewed by jmc@lum
2012-06-18When using M-> Place cursor at the bottom of the window (minus 3lum
lines) like emacs, instead of middle of page.
2012-06-18Removing this 'if' statement allows dired buffers to not have theirlum
forward and backward line pointers pointing to the same line, causing mg to spin when asked to split the window. This happens if a directory is opened via the command line sequentially first, and other windows need to opened afterwards (for other files). Since the information within this 'if' statement is updated later for files and directories I can see no problem with removing this. No regressions viewable either. Problem reported by and diff tested by jasper@
2012-06-18- add a pathnames.hJasper Lievisse Adriaanse
- some whitespace cleanup ok lum@
2012-06-18- explicitly use DOCMODE instead of NONBINMODEJasper Lievisse Adriaanse
ok lum@
2012-06-15Fixes a problem where if you try to open a file that doesn't exist and haslum
a name longer than LOGIN_NAME_MAX and also has a tilde at the front e.g: $ mg ~01234567890123456789012345678901 mg will give a "Login name too long" instead of opening a new buffer named ~01234567890123456789012345678901
2012-06-14Add paragraph about "non-standard" mg commands.lum
2012-06-14Allow mg to save backup files to a users home directory.lum
Suggestions from eric@ and Sunil Nimmagadda. Remarks deraadt@.
2012-06-11Change error message to reflect the correct filename: nname is 'Newlum
name' as opposed to tname 'Temp name'
2012-06-08From an email to tech@:lum
Bit difficult to explain this one. If you have a file open that is 3 or 4 times longer than the length of the viewable window and are at the bottom of the buffer then scroll up to the top using M-v, your cursor should remain at the bottom left of the window once you reach the top of the buffer. mg behaves like this since the last couple of scrolling diffs I've committed. However, and as an example, if you start with the window viewing the top of a buffer and press C-v twice, then C-p four times then M-v twice to scroll back to the top, you will find your cursor is NOT at the bottom left of the window. tut tut. This diff makes the cursor stay at the bottom left, like emacs.
2012-06-08Fix bug where line-number counter would go a bit hay-wire when paginglum
up with only 1 line of the buffer visible.
2012-06-07Add some cscope support to mg. From Sunil Nimmagadda. Due to somelum
structural limitations in mg, mg doesn't behave exactly the same as emacs cscope (see the README) but is still very usable. man page bits reviewed by jmc@, otherwise tested and reviewed by myself.
2012-06-04Open theo mode without splitting window in 2.lum
2012-06-01While scrolling, show a message and beep when you reach either end oflum
a buffer.
2012-05-31Currently, mg's cursor jumps from top to bottom of the screen as youlum
scroll upwards, make the cursor behave like emacs and stay at bottom of window. Tested by mikeb@.
2012-05-30Reverse part of v1.131. The end of buffer can still be reached so Ilum
shouldn't have taken out the second check. Hopefully fix unpredicable scrolling behaviour seen by mikeb@.
2012-05-29There is no other reference to SYSCLEANUP in the src tree. Remove.lum
2012-05-29There is no need to use an *init* buffer if we go back and updatelum
opened file(s)/*scratch* with default modes after they are open. Also, pass buffer (bp) to edinit(), this fixes theo mode from the command line (mg -f theo).
2012-05-29Increase the size of some window variables from char to int. This difflum
improves mg on screens (xterms) with lots of lines. Testing done by naddy@ and myself.