summaryrefslogtreecommitdiff
path: root/usr.bin/mg
AgeCommit message (Collapse)Author
2006-12-24Fix a bug where inserting a file resulted in an incorrectKjell Wooding
line-number count for a buffer (M-X insert-file, M-> to reproduce). While here, fix a number of bugs with incorrect line numbers after swap point-and-mark Originally reported via debian's bug tracking system. Fix tested by Han Boetes and Deanna Phillips.
2006-12-24Add column-number indicator to status line (enabled when line-number-mode isKjell Wooding
enabled; i.e. by default). This is essentially free, and has been requested a few times now
2006-12-21Fix a realloc-style bug (curmap = reallocmap(curmap)) inKjell Wooding
keymap repapping. spotted by theo
2006-12-21Eliminate BSMAP #ifdef (we didn't define it). This exposes bsmap-mode,Kjell Wooding
which swaps ^H and DEL. ok jason@
2006-12-20kjell loves his extra spacesTheo de Raadt
2006-12-20Get rid of CVMVAS define. Originally to change pgforw/back parameterKjell Wooding
from pages to lines. We don't use it.
2006-12-20since auto-execute expects a function name at the "Execute:" prompt anyway,Kjell Wooding
enable autocomplete for that field.
2006-12-20kill an ill-formed (and totally unnecessary) realloc.Kjell Wooding
Spotted by theo.
2006-12-16Get rid of PREFIXREGION ifdef, since we always enable it anyway.Kjell Wooding
no binary change.
2006-11-19spacingTheo de Raadt
2006-11-18Move buffer name allocation into bnew() where it belongsKjell Wooding
2006-11-181. Fix line numbering/mark line bug in isearch.Kjell Wooding
To reproduce, set mark, move, isearch, then swap mark and point. 2. store mark in save structure (to reproduce search on a pattern twice, then backspace to back up the search stack) Both from Peter De Wachter (debian bug#391827) Thanks!
2006-11-18Due to a thinko on my part, (and a badly named structure member),Kjell Wooding
line numbers were horribly broken with pgup, pgdn. From peter de wachter, via debian bug#391827
2006-11-18Fix line number bug (actually, dot-mark bug). to reproduce:Kjell Wooding
-split window into two -open a file, set the mark -switch windows, open same file, exchange point-and-mark from peter de wachter (Debian bug#391827)
2006-11-17Fix a needless inversion of flag names; i.e. change them from theKjell Wooding
negative to the positive. undo_boundary_enable(TRUE) makes a LOT more sense than undo_no_boundary(FALSE). While here, whack a global, and fix a bug noted by otto: undoing a file insertion sometimes left stray characters around. ok beck@, otto@
2006-11-17fix a segfault on isearch. Using ^W to add more than NPAT chars to theKjell Wooding
search pattern had an off-by-one. Fix this and one other irritating behavior with long search patterns. Noted (similar diff proposed) and tested by deanna phillips
2006-11-01Don't overwrite line[strlen(line) - 1] when line is zero-length.Ray Lai
Initial patch by Charles Longeau <chl at tuxfamily dot org>. OK kjell@.
2006-09-19Use S_IS* macros insted of masking with S_IF* flags. The latter mayOtto Moerbeek
have multiple bits set, which lead to surprising results. Spotted by Paul Stoeber, more to come. ok millert@ pedro@ jaredy@ djm@
2006-09-02various improvements from deanna phillips; tweaked by myselfJason McIntyre
ok kjell
2006-08-18Move backward-paragraph, forward-paragraph to M-{, M-} respectively.Kjell Wooding
(not M-[, M-]). This is where emacs has it.
2006-08-01* move sys/queue.h inclusion to sysdef.h (it's system specific)Jason Wright
* add <signal.h> to sysdef.h (needed for sig_atomic_t on linux, and we get it by accident on OpenBSD) * remove <signal.h> from tty.c/spawn.c (not needed now that it's in sysdef.h) ok beck
2006-07-27unused functionTheo de Raadt
2006-07-25Add bfirstlp(), blastlp() macros, returning the first and last linesKjell Wooding
of a buffer respectively. Removes an ugly construction than necessitated "go to first line"-type comments throughout the code. No binary change
2006-07-25Rename the header line of a buffer to b_headp, from the remarkablyKjell Wooding
unintuitive b_linep. No binary change.
2006-07-17These bugs were fixed long ago.Kjell Wooding
2006-07-17Better usage() wording. Add -h to mean same. Some whitespace cleanKjell Wooding
2006-07-08Introduce a 'MODIFIED' boundary type for undo records.Kjell Wooding
This allows undo to clear the modified flag when undo-ing all the way from a loaded buffer. Originally whipped up at c2k6 after proddings from beck. jason@ ok.
2006-07-08Fix a trio of bugs in line numbering: adjusting linenos after undo,Kjell Wooding
cutting a block, and off-by-one linecount. Initial bug discovered by jason
2006-06-29- use <dirent.h> not <sys/dir.h> (this appeases FreeBSD's annoying #warning)Jason Wright
- grab <sys/time.h> before <sys/resource.h> like getrusage(2) says ok kjell
2006-06-01kill another superfluous strlenKjell Wooding
2006-06-01Style. no practical change.Kjell Wooding
2006-06-01Fix message on empty goto-line. While here, lose a strlen and KNF.Kjell Wooding
2006-06-01Display line number in the mg statusbar. Yes, it seems like a fuglyKjell Wooding
way to do it, but all the clever and pretty ways utterly failed. Basic use seems fine. We'll turdshine the special cases later. If it bothers you, use M-x line-number-mode, or put same in your ~/.mg file to disable. ok cloder, jason
2006-06-01fix styleKjell Wooding
2006-06-01make // /~ path rewriting optional in adjustname() and use it everywhereJason Wright
except for the command line specified files. ok kjell,cloder
2006-06-01Initialize current window, and clear the readonly flag earlier in fileKjell Wooding
read process. This allows code in the autoexec path (i.e. ~/.mg) to operate on the buffer, making ~/.mg files much more useful.
2006-06-01Make transpose (c-T) undoable.Kjell Wooding
There is still a bug here, but it lies in undo (cursor position when undo wraps the undo list), and is purely cosmetic for now.
2006-06-01find-file-other-window and find-buffer-other-window should splitKjell Wooding
the window if you ask for whatever file you are currently visiting. pointed out, ok beck@
2006-06-01Cleanup, and a new one from Aleksander Piotrowski:Kjell Wooding
"cache aliasing is a problem that would have stopped in 1992 if someone had killed about 5 people who worked at Sun."
2006-05-29Another mnemonic rename, missed the first time.Kjell Wooding
Also missed the ok cloder.
2006-05-28Make Window Flags more mnemonic (and less dumb); i.e.Kjell Wooding
WFHARD -> WFFULL (Redraw full window) WFFORCE -> WFFRAME (Reframe window). No binary change
2006-05-27Move stderr redirection to a common location, as suggested by vincent aKjell Wooding
while ago. While here, get rid of some of the stupid static buffer sizes. I've been running with this for quite a while.
2006-05-27Move mg "line to c-string" functionality to a function.Kjell Wooding
2006-05-08spacingKjell Wooding
2006-05-08minor man page tweaks. From han boetes.Kjell Wooding
2006-05-03correct one more commentKjell Wooding
2006-05-03Do some KNF, clean up some unused junk that has lying around for 40-oddKjell Wooding
cvs revisions, and fix a few comments to match reality
2006-05-03len = strlen(foo); if foo[len - 1]... will do bad things if len == 0.Kjell Wooding
Avoid, and rearrange a test so it can't (hypothetically) overflow.
2006-05-02Make buffers store their own working directory. This makes things likeKjell Wooding
grep, compile, lint work as expected (act on current buffer's cwd). Display this path when opening or replacing a file, rather than relying on the user to guess, or remember.
2006-04-06Fix a bug whereby a written buffer (^X^W) would not have the correctKjell Wooding
trailing buffer number appended (e.g. "file<2>") in case an existing buffer shared its basename().