| Age | Commit message (Collapse) | Author | Files | Lines |
|
This partially reverts f9e2b884c15919757651db8b10c033a344a19e75
further jumps after leaving visual mode should not break `gv`.
|
|
This was completely broken since 71eab6d5d72145f17ab3d4c87945ac12176ae8e9
and even before never really worked as one would expect.
If anything it should be implemented like the jump list using marks.
|
|
|
|
|
|
The key binding remain the same, but the selections are now stored on
a per-buffer basis.
|
|
This window local register holds the last active selections.
|
|
|
|
|
|
Close #563
|
|
Previously the # register was always reported as containing only
one entry. This wrongly caused the first value to be put at all
locations.
Fix #544
|
|
|
|
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
|
|
As currently implemented this will only work for operations which are
individually fast, but repeated many times (e.g. `1000000itext<Escape>`).
|
|
|
|
The following key mappings should result in the vi behavior:
:map! normal n <vis-motion-search-repeat>
:map! normal N <vis-motion-search-repeat-reverse>
The default remains unchanged, that is `n` (`N`) always searches towards
the end (start) of the file.
Fix #470
|
|
|
|
|
|
It is no longer possible to change the used syntax by assigning to the
`win.syntax = name` field, instead the function win:set_syntax(name)`
should be called.
The distinction between filetype and syntax lexer to use should probably
be clarified/cleaned up at some point.
|
|
Use pull instead of push based model for display code. Previously view.c
was calling into the ui frontend code, with the new scheme this switches
around: the necessary data is fetched by the ui as necessary.
The UI independent display code is moved out of view.c/ui-curses.c into
vis.c. The cell styles are now directly embedded into the Cell struct.
New UI styles are introduced for:
- status bar (focused / non-focused)
- info message
- window separator
- EOF symbol
You will have to update your color themes.
The terminal output code is further abstracted into a generic ui-terminal.c
part which keeps track of the whole in-memory cell matrix and #includes
ui-terminal-curses.c for the actual terminal output. This architecture
currently assumes that there are no overlapping windows. It will also
allow non-curses based terminal user interfaces.
|
|
The macro replay code has since been refactored, making this
obsolete. There is only ever one input queue from which keys
are interpreted.
|
|
$ ./configure --disable-help
shrinks the binary by about 20K on a x86_64 system.
|
|
Some motions should fail (i.e. keep the initial position) when
the specified count can not be satisfied exactly.
Examples include t, f, T, and F.
Fix #497
|
|
Fix `gN` and delimited inner variants when given a count.
|
|
|
|
Rather than inserting a newline and then looking for leading white space
of the previous line we now gather the white space before newline insertion.
Also we no longer indent empty lines.
Close #472
|
|
This esentially performs an insertion sort. Rather than iterating the list
from the start every time keep track of the latest change and optmize for
monotonically increasing file positions.
|
|
Terminal.app sets $TERM=xterm-256color and ships a corresponding
terminfo description advocating that it is capable of color changes
to the 256 color palette when in fact it can not.
We introduce a new boolean option "change-256colors" which is
true by default but can be used to disable color changes. It is
automatically set if Terminal.app is detected using $TERM_PROGRAM.
This should fix display artifacts as described in #456.
|
|
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).
|
|
|
|
Fix #372
|
|
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.
|
|
|
|
|
|
|
|
|
|
For some reason we ended up with two identical functions: buffer_{clear,terminate}.
|
|
|
|
The handling of :unmap needs to be revisited at some point.
|
|
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`.
|
|
Properly detect unbalanced curly braces and spurious output at the
end of a group.
|
|
Move all signal handling code out of "library" code into user application.
|
|
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.
|
|
Indicating that the event is triggered *after* a successfull write.
|
|
We need to push keys individually to the input queue such that
the state machine can advance and record keys into the operator
macro if necessary.
Previously feeding the following input:
isome text<Escape>.
would not work as expected because the complete key stream
was pushed to the input queue at the same time during which
the operator macro was not yet active. Thus the dot command
at the end would have nothing to repeat.
|
|
Do not initalize curses UI before it is actually needed.
Move vis command line argument parsing logic into main.c.
This fixes `vis -v` output and exit status.
Fix #351
|
|
Add another layer of indirection, move actual event generation
code to a dedicated function.
|
|
In preparation to move argument parsing code out of vis.c.
|
|
We first try $SHELL and then fall back to the shell field of the password
file entry (/etc/passwd).
|
|
They both perform a motion before changing mode.
|