| Age | Commit message (Collapse) | Author | Files | Lines |
|
$ ./configure --disable-help
shrinks the binary by about 20K on a x86_64 system.
|
|
|
|
|
|
Currently the key handling functions do not know through which mapping
they were invoked. As an example the `count` handler exploits the
implementation detail that the input queue is stored in contiguous
memory, meaning `keys[-1]` gives access to the digit being pressed.
This adds infrastructure to keep track of the two most recently processed
keys of the input queue.
The information is guaranteed to be accurate for the initial invocation
of the key handler but will be overwritten in case new keys are pushed
to the input queue (e.g. through vis_keys_feed).
|
|
|
|
The vis_keys_feed function is currently unaffected by this change.
It still creates individual undo points. While this is probably
undesirable from an API point of view, it keeps the lua based tests
that use undo points working.
|
|
These are currently only updated for `x` and `y` sam commands,
whether they should be updated for other search related activities
(`/`, `?`, `n`, `N`, `*`, `#` etc.) needs to be investigated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The handling of :unmap needs to be revisited at some point.
|
|
Not strictly C99 conform, but widely supported and easy enough to NOP
for compilers which do not support it. Besides it was already used to
mark certain functions as noreturn.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Only accept numbers in range [0, INT_MAX]. Reject trailing garbage,
where before something like `:set cc 50NaN` worked it will now cause
an error.
Close #418
|
|
|
|
The `:!` command did redirect stdout to a pipe which was used by
`vis-menu` to return the selected entry. However, this breaks
other interactive commands such as `:!/bin/sh` where command
output was never displayed. Instead we modified `vis-menu` to
re-open /dev/tty for its user interface which makes it work
as a regular filter `:|`
This patch also obsoletes the interactive flag previously passed
to the vis_pipe function. Interactive mode is instead enabled
by piping an invalid range.
|
|
The first argument is the file object while the second argument denotes
the full path to which it will be written. Path might be `nil` if the
file is going to be written to stdout.
The Lua function is expected to return a boolean value indicating whether
the write operation should proceed or be aborted.
|
|
The passed path can be different from file.name for instance when
opening a file `a` and then doing `:w b` where file.name will be the
former and path the latter.
|
|
Indicating that the event is triggered *after* a successfull write.
|
|
If the shell command is omitted, the last shell command (of any type)
is substituted. The most recently used shell command is stored in a
new register currently named `!`.
|
|
In preparation to move argument parsing code out of vis.c.
|
|
Delete the given range and insert the same number of replacement characters.
|
|
They both perform a motion before changing mode.
|
|
The character following the `r` command in normal mode should be
treated as regular input given in insert/replace mode, that is no
tranformation should be applied. Temporarily disable the language
map for this reason.
Close #382
|
|
The shell script should be reviewed for quoting issues, currently
it allows command injections as in:
$ vis-complete "'; rm -f some-file; echo "
However it is intended for interactive usage and from within vis
it is only ever called with a valid completion prefix.
The file name completion logic now supports nested directories.
Close #347
|
|
The behavior is not exactly the same because vim preserves any
existing white spaces wihle we remove existing ones but do
not insert additional ones.
The vim behavior (essentially only deleating new lines) can be
achived using something like:
:x/\n/d
Close #374
|
|
|
|
Let vis_keys_feed always have an immediate effect. Previously,
if called from a key input handler the keys would just be added
to the input queue and processed once the current key handler
returned.
This also affects the exposed Lua API.
|
|
Try to display a shorthand version in the status bar, this currently
only works for files below the current working directory of the editor
process.
|
|
Make window status bar content configurable via Lua.
|
|
|
|
|
|
|
|
|
|
|
|
Previously the interactive mode was implicitly enabled by passing
an invalid range. However for some use cases (e.g. completion) we
need to be able to pipe a given text range to an external process
without also redirecting stderr (which is used to draw the slmenu
interface on top of vis).
|
|
|
|
|
|
|
|
|
|
|
|
|