Age | Commit message (Collapse) | Author |
|
dointent() didn't know about set-tab-width so it was mis-indenting
the lines. Diff from Mark Willson (mark dot willson at hydrus.org.uk),
with a tiny change by me.
|
|
for a while it has used only spaces when no-tab-mode is enabled and respected
the current buffer tab width.
|
|
Since the import of mg in the tree, space_to_tabstop used curbp->w_doto
(the byte offset in the current line) as mean to deduce the current
column for indentation. This is wrong because it doesn't account for
tab, control characters and octets > 127 (which are all rendered with
more than one column.) Use instead getcolpos().
ok tb@
|
|
This makes the tab width customizable per-buffer. The new function
`set-tab-width' changes it for the current buffer or the default value
for new buffers if called with a prefix argument (or from the startup
file.)
The default tab width is still 8 column.
Together with the newly resurrected no-tab-mode, allows to use mg for a
variety of programming languages and coding styles.
Note that it's not possible to call set-tab-width with auto-execute in
the startup file due to limitations in how auto-execute and the parser
work.
ok tb@
|
|
|
|
It's a mode that makes mg insert spaces up to the next tab stop upon
pressing TAB, along with the various tweaks needed in other places so
for e.g. auto-indent-mode also uses spaces.
This is not just an unifdef NOTAB: even under no-tab-mode mg should
consider literal TAB characters wide up to the next tab stop, while the
hidden code considered hard tabs to be just control character (i.e. ^I)
with width of two columns. I'm also introducing the helper function
doindent() in utils.c to de-obfuscate the insertion of tabs/spaces until
the given column.
ok tb@
|
|
ok miod@ millert@
|
|
auto-indent-mode (only after computing the auto indent.)
tested also by Mikhail (thanks!). ok tb@
|
|
buffer specific variable. The diff should not produce any behavourial
changes in mg.
|
|
1. two spelling mistakes.
2. change references to keystrokes, same as man page (UP-low).
3. update a filename reference to reality.
|
|
The additions help while developing mg by not having to go into gdb to
see somethings mg believes about itself. The extra data shown could be
removed in future, but it is benign so perhaps it could stay.
Also, do not fake a '\n' on the end of buffer. It is confusing.
However do not change the lie about '\n' being on the end of every
line within the buffer. Hopefully, one day, that will no longer be a
lie.
|
|
This caused a change of behaviour in the search case, and isn't yet ready.
Committing on the behalf of lum@
OK lum@
|
|
and a region is selected. The contents of the region are then placed
into the kill buffer. Like emacs.
|
|
|
|
Except C-k which has a defined behaviour. In mg, C-t doesn't complete
n iterations if requested, but probably should, hence it has been
included in this diff.
|
|
ok millert@
|
|
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@
|
|
Emacs. This diff makes mg behave more so. Though new-line characters
are treated as any other.
Difference from emacs observed and reported by deraadt@. First diff
tested and ridiculed by deraadt@. Second diff not tested and not
ridiculed by deraadt@ but at least email responded to.
|
|
column number of the active window.
OK jasper@
|
|
note: no-tab-mode needs more work done before removing the NOTABs.
|
|
was built. no binary change here. confirmed by lum@, tested by Henri Kemppainen
|
|
clean up undo boundaries for functions in random.c
This catches an error, where twiddling in an empty file could
disable undo boundaries for the rest of the session.
proper undo boundaries around newline() will have to wait until
proper reference counting is done... Thanks!
|
|
Join the current line to the previous.
original diff by Henri Kemppainen. minor mod to add undo boundaries.
Thanks!
|
|
Move the dot to the first non-whitespace character on the current line.
from Henri Kemppainen . ok theo
|
|
This should have no functional change on undo, but it does facilitate
testing undo behavior.
|
|
indent-current-line utility functions for stripping leading/trailing
whitespace, and setting a fixed indent respectively.
|
|
|
|
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@
|
|
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.
|
|
|
|
|
|
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.
|
|
This will help move to a kill-ring.
|
|
|
|
|
|
|
|
(i.e. undo boundaries are placed around entire yanked block)
ok cloder@
|
|
ok millert@, deraadt@
|
|
- spelling, punctuation fixes
- variable declaration lineup
- use parentheses for return and sizeof
- K&R function declarations -> ANSI
- other minor code beautification
ok henning@
|
|
OK vincent@
|
|
column.
ok jason
|
|
dkm_holdings@hotmail.com
ok art@
|
|
|
|
|
|
ancient compiler.
|
|
|
|
|
|
needs hand fixup. I stopped at keymap.c...
|