Age | Commit message (Collapse) | Author |
|
behavior.
From Scott Cheloha <scottcheloha@gmail.com>
ok florian@
|
|
switching to *scratch*. (Which seems to be the least useful thing to
do.)
This brings mg in line with emacs.
OK lum; deraadt@ was bugged by this, too
|
|
Found by Coverity Scan. The popbuf() function iterated over a list to
find a wp pointer, then sent it to showbuffer() which immediately went
ahead and dereferenced it. This patch simply adds a NULL pointer check
before calling showbuffer(), if NULL then just return NULL to callee.
ok awolk@ millert@
|
|
mg
c-x b RET
c-x k RET
mg segvs. Initial diff from Joachim Nilsson. This diff tested
by Han and Joachim and ok florian@ jasper@
|
|
|
|
|
|
termios.h so we don't need the code for when it is not defined.
ok reyk@
|
|
-UDIRED_XMAPS and -UFUND_XMAPS: you can't build mg the other way.
-DTIOCGWINSZ: you have this if you have term.h
Remove a #define TERMCAP which isn't being used.
Remove defines for NDIRED_XMAPS, NFUND_XMAPS, and IMAPEXT. They are all
defined to be 0 and are only ever used in addition. We don't need to add 0.
Simply lines that were using those defines.
ok florian@
|
|
This does the following:
Moves all POSIX headers from sysdef.h into the individual .c files so that
each file now only includes what it needs. All headers are properly sorted.
Moves the remainder of sysdef.h to other files (mostly def.h) and deletes
sysdef.h now that it's no longer contains anything.
Tweak a comment that references sysdef.h so that it no longer does that.
ok florian@
|
|
function of the same name in term.h. This is the first step towards
cleaning up mg's includes. No user-visible changes.
ok florian@
|
|
Merge the new if into a single line, requested by florian@
ok matthew@ florian@
|
|
ok florian@
|
|
ok florian@
|
|
from jmc@ again.
|
|
While this did work in this particular case because the
list was no longer used it at least sets a bad example.
ok benno, jasper, lum
|
|
problem spotted, initial diff and ok lum@
|
|
input gsoares@, Sunil Nimmagadda, jasper@
ok jasper@, benno@
|
|
report.
ok lum, jasper, benno
|
|
|
|
ok lum, jasper, benno
|
|
prompt.
input, ok lum@, man bit ok jmc@, ok benno@
|
|
ok jasper@, benno@
|
|
- 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@
|
|
let the error stop mg exiting when C-x C-c is called.
|
|
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.
|
|
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.
|
|
has not done so for numerous years. Not hard to fix, but just remove anyway.
ok kjell@ millert@
|
|
which have fewer special cases, and use the strlcpy/strlcat
src/dst/buffer len semantic. More portable to boot.
Discussion and feedback from Henri Kemppainen
|
|
was built. no binary change here. confirmed by lum@, tested by Henri Kemppainen
|
|
ok kjell@
|
|
means.
If we hit an OOM condition, mg started to try and dump the older undo buffer
entries in order to be able to continue. OTOH, it was grabbing this entry with
LIST_END, which like all *_END() list macros evaluates to NULL.
Do what we actually want and switch that list to a TAILQ and use
TAILQ_LAST to grab the last entry.
Wrote this a loooooong time ago after a mail from Matthew Dempsky on
bugs@. ok kjell@, beck@ also looked at this months ago and thought it
was alright.
|
|
|
|
(e.g. *scratch*, *Completions*, *grep*) it is considered throwaway; i.e.
the user will NOT be prompted to save changes when the buffer is killed.
|
|
for destruction at a later date. (in the process, add a window flag field)
This fixes an issue noted by maja: namely, the *completion*
window that pops up when you try to complete a filename on
buffer load would destroy any second window that you happened
to have open.
ok maja@
|
|
flag: it is for redisplay options only. I need an additional all-purpose
flag, so renaming removes the desire to wrongly overload the existing one.
Turdshine. No functional chage.
|
|
|
|
Emulate the emacs behavior: after suspend/resume, buffer switch,
or at save time, warn (prompt) the user if the file has been modified
on disk in the interim.
This has already saved my butt numerous times.
ok phessler
|
|
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.
|
|
|
|
|
|
-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)
|
|
of a buffer respectively. Removes an ugly construction than necessitated
"go to first line"-type comments throughout the code.
No binary change
|
|
unintuitive b_linep. No binary change.
|
|
cutting a block, and off-by-one linecount. Initial bug discovered by
jason
|
|
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
|
|
the window if you ask for whatever file you are currently visiting.
pointed out, ok beck@
|
|
WFHARD -> WFFULL (Redraw full window)
WFFORCE -> WFFRAME (Reframe window).
No binary change
|
|
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.
|
|
trailing buffer number appended (e.g. "file<2>") in case an existing
buffer shared its basename().
|
|
|