| Age | Commit message (Collapse) | Author | Files | Lines |
|
Now that register.h is no longer used by view.h we can move the struct
and function declarations to vis-core.h.
|
|
Decouple register content from cursors. Previously each cursor had
exactly one corresponding register. Now each register can save a
list of values whose lifetime is not tied to the cursor.
If multiple cursors exist and a put with a register holding only
a single value is performed, then this value is inserted at every
cursor location. If there are fewer values available than cursors,
then only the matching ones will be used. If a register holding
multiple values is inserted in a single cursor context, only the
first value will be used. Another option would be to join all
existing values. The details of this behavior might be changed
in the future.
<C-r> in insert mode has not yet been adapted and register handling
in general needs to be cleaned up further.
Fix #527
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
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).
|
|
This should ease packaging for systems with an existing vis(1) binary.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is handy when editing registers used for macros.
|
|
|
|
Both registers are currently treated identically.
The actual system integration is performed by two shell
scripts vis-copy and vis-paste.
|
|
|
|
|
|
Introduce buffer_init to initialize a stack allocated buffer.
Rename buffer_{alloc,free} functions because they do something
different than the usual convention. They operate on the underlying
buffer data but do not allocate/free an actual Buffer struct.
|
|
At some point this should be optimized further at the moment there
is some 20 byte overhead for each entered key.
|
|
|
|
|
|
|