| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Do not change buffer length when failing to append.
|
|
Notice that currently only single letter register names/array indices are
supported.
Register handling needs to be cleaned up at some point.
|
|
|
|
|
|
Make obj_ref_check handle invalid object references.
The luaL_argerror function throws a Lua error and never returns, hence all
return value checks become obsolete.
|
|
We need to retrieve a pointer to the File struct but can not store it
directly in the Lua uservalue because the address is already used for
the regular file object (of type vis.file). For now we use file->marks
as an address and then use offsetof to retrieve the start of the struct.
|
|
|
|
|
|
Boolean options can be toggled by appending `!` to the option name.
Close #435
|
|
When given a mapping like:
:map! insert >> ><>x>
whose end is a prefix of another mapping we should still remove all
already consumed keys from the input queue.
Fixes #436
|
|
|
|
|
|
Fixes #434
|
|
|
|
This allows inclusion in other Makefiles (e.g. for C unit tests).
|
|
Previously we only made sure that the register content is NUL terminated
when reading it out. This made it impossible to distinguish between an
empty register and one which stores a single NUL byte. Now the in memory
representation of a non-empty register is always NUL terminated. When
appending we temporarily remove the trailing NUL byte and restore
it later.
This should fix put commands of a previously yanked single NUL byte.
|
|
It can happen that the Buffer content used for the input queue becomes
<\000> where the NUL byte is intended to terminate the queue, but termkey
happily parses it and because it is delimited by < and > on both sides
we then interpret it as a key. In input mode this leads to the insertion
of a NUL byte which is displayed as ^@.
Close #432
|
|
Close #433
|
|
|
|
Differentiate between the case where the module is not found and
the case where an error occured while loading it.
This should make it easier to debug cases in which there is a
Lua version mismatch between vis and lpeg.
|
|
The very first thing we do if that check is false, is return from the function.
|
|
It links lpeg statically into the vis binary, meaning it does not need
to be dlopen(3)-ed at runtime. While this improves the portability of
the resulting vis binary, it is not necessary to enable this option to
get syntax highlighting support.
Maybe the option should be renamed to avoid further confusion.
|
|
Close #429
|
|
This should fix isses with `crontab -e` editing.
|
|
|
|
|
|
Specifies how the current file should be saved, `atomic` which uses
rename(2) to atomically replace the file, `inplace` which truncates the
file and then rewrites it or `auto` which tries the former before falling
back to the latter. The rename method fails for symlinks, hardlinks,
in case of insufficient directory permissions or when either the file
owner, group, POSIX ACL or SELinux labels can not be restored.
The option defaults to `auto`.
|
|
There are cases where it is useful to specify how the file should be saved.
|
|
The simple method lpeg uses to create a shared library does not seem
to work in Cygwin.
|
|
This fixes a warning when displaying the manual page on macOS systems.
|
|
These are used by `make standalone` but are not really appropriate
for normal usage and just cause confusion as demonstrated by #373.
|
|
|
|
If lpeg is built statically, this allows for a completely static vis
binary that still supports syntax highlighting.
|
|
Fixes CID 139067.
|
|
Expose text_object_word as an example.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Previously we would also interpret a missing return value `nil` as
is the case when no pre save event handler is subscribed as failure.
|
|
|
|
|
|
|
|
The init event is emitted immediately after `visrc.lua` has been sourced, but
before any other events have occured, in particular the command line arguments
have not yet been processed.
Close #422
|
|
The editor core calls into the functions registered in the `vis.events`
table which then multiplex the events to all registered event handlers.
The first handler which returns a non `nil` value terminates event
propagation.
|
|
The following structure is adapted:
* visrc.lua entry point for all Lua code
* vis.lua only implements the Lua part of the core API
* vis-std.lua registers standard event handlers (e.g. syntax highlighting,
statusbar handling, theme changes etc). It is sourced from vis.lua.
* plugins/* non essential editor functionality, needs to be explicitly
enabled by loading it from visrc.lua
|