summaryrefslogtreecommitdiff
path: root/usr.bin/mg/def.h
AgeCommit message (Collapse)Author
2007-05-28Add a global-wd-mode command, which toggles between the currentKjell Wooding
behavior (every buffer maintains its own cwd) and the old behavior of one global working directory. This makes it slightly easier to hack on things like kernel code, where compilation, etc, are initiated from a different directory than you are working in. While here, fix setting/handling of global wd.
2007-02-21Fix a reference to WFHARD in a comment; it was renamed WFFULL monthsDeanna Phillips
ago. ok kjell
2006-11-19spacingTheo de Raadt
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-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-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-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-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-01make // /~ path rewriting optional in adjustname() and use it everywhereJason Wright
except for the command line specified files. ok kjell,cloder
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 mg "line to c-string" functionality to a function.Kjell Wooding
2006-05-08spacingKjell Wooding
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().
2006-04-03fixed "text in message line would get stuck there" issue.Kjell Wooding
feedback from Philip Guenther and Han Boetes
2006-02-25Fix a coredump occurring when the terminal is resized while mg isOtto Moerbeek
suspended. Problem reported and fixed tested by reyk@; tweak by kjell@; ok kjell@
2005-12-20Clean up the ugly casted frees. In one case, this meant eliminating a nastyKjell Wooding
struct/union/casting nightmare when building the list of names for filename completion. In particular, be consistent about strduping and freeing the list data.
2005-12-13Last round of easy delinting.Kjell Wooding
2005-12-13More name-clash delintingKjell Wooding
2005-12-13If you're going to pass a length parameter, you should use it.Kjell Wooding
2005-11-22Move kill-related commands to their own file.Kjell Wooding
This will help move to a kill-ring.
2005-11-20toast NO_DIRED #ifdef; ok kjellTheo de Raadt
2005-11-18Split kill buffer code into a separate function.Kjell Wooding
2005-11-18clean up some comments after theo's cleanupKjell Wooding
2005-11-18greedy use of typedef struct was making code harder to read; ok kjell cloderTheo de Raadt
2005-11-18Casefold on replace was killed ages ago (it was wrong). Remove aKjell Wooding
leftover (unused) variable.
2005-11-07Move most of the dired hooks into dired.c. While here, enable someKjell Wooding
dired functions that were written, but not bound to keys. No other functional change. Tested by Han Boetes.
2005-10-14move the dired routines into dired.c where they belong.Kjell Wooding
ok cloder@
2005-10-13Make dired buffer read-only by default.Kjell Wooding
Noticed by Han Boetes
2005-10-13Use dired mode automatically if file specified for loading isKjell Wooding
a directory. Modified version of patch from Han Boetes. ok cloder@
2005-10-13Make mg's grep and compile more path-aware, by defaulting toKjell Wooding
the path of the invoking buffer. Also, make subshell output look more like emacs (show directory, completion time). oked at one point by deraadt@
2005-10-11A while back, undo records were moved from the BUFFER struct to MGWIN.Kjell Wooding
This is nonsensical, and utterly broken if you are undo-ing across multiple buffers. Change them back to being associated with the BUFFER struct. (effectively, just revert the original change) ok deraadt@
2005-10-11Enable the 'next-error' (C-x `) keybinding by default.Kjell Wooding
Niklas, this one is for you. ok deraadt@, cloder@
2005-10-06Make mg undo much more emacs like (and correct).Kjell Wooding
Undo boundaries are now placed at newlines, and undo of search-replace works as expected. Fixes bad behaviour reported by matthieu Ok deraadt@, beck@
2005-06-14Add explicit public domain notices to all public domain files.Kjell Wooding
ok millert@, deraadt@
2005-05-31fix broken minibuffer defaults introduced in echo.c:1.33Kjell Wooding
adds eread flag EFDEF allowing null minibuffer response noticed by otto ok cloder@ jason@, works otto@
2005-05-30add find-alternate-file command and binding for ^X^V; ok cloderJason Wright
(you're welcome kjell)
2005-05-27Add emacs-style replace-string function that does not prompt youChad Loder
to confirm replacements. OK jason, deraadt
2005-04-03This is a no binary change which does:David Berghoff
- spelling, punctuation fixes - variable declaration lineup - use parentheses for return and sizeof - K&R function declarations -> ANSI - other minor code beautification ok henning@
2005-03-12spacingTheo de Raadt
2005-03-10fix more BACKUP/NOBACKUP/NO_BACKUP confusion, again no binary change.Henning Brauer
spotted by jmc@
2005-03-09fix mg's behaviour with regards to files on which we do not haveJean-Francois Brousseau
write access. diff originally from vincent@ and forgotten for a while. ok rohee@, "toss it in, i'll bitch if it doesn't work" henning@
2004-07-22stage 1 of the infinite minibuffer work - add support for on the flyVincent Labrecque
buffer reallocation in veread(). This commit only changes the API. All the buffers have exactly the same bounds as before for now. tested by a couple of my very helpful testers!
2004-07-09when saving a file, check whether it is newline terminated and if it is not,Vincent Labrecque
prompt the user and add the newline if he agrees. tested by a lot of helpful tech@ guys, approved by henning
2004-01-27make mail-mode more intelligent on middle-of-line insertions, and add aVincent Labrecque
comment to change the wrapping column. (mail-set-margin) tested by henning and phessler, thanks!
2003-11-29save the previous undo position as an offset in the buffer instead ofVincent Labrecque
a line/offset pair
2003-11-09remove the only use of the hackish undo_add_custom function.Vincent Labrecque
2003-11-09remove unused structure elementVincent Labrecque