| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
This unifies cursors and selections. The cursor are now represendted
as singleton selections.
|
|
|
|
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
|
|
|
|
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.
|
|
Can be NULL if no cursor is associated with the given selection (this is
currently never the case).
Avoids a loop through all cursors when clearing selections.
|
|
At least one cursor (referred to as primary or main cursor) has always
to exist. In the sam command language implementation we might want to
dispose a cursor even if it is the primary one before later commands
will create different ones (e.g. `:x/pattern/ { i/>>>/ a/<<</ }`).
This commit introduces view_cursors_dispose_force. If called on
the last remaining cursor, its selection is cleared and it is marked for
destruction as soon as a new cursor is created. view_cursor_disposed
returns the cursor marked for deletion (if any) and clears the descruction
flag.
|
|
Make cursor placement after scrolling (half) pages up/down less arbitrary.
Close #390, fix #391
|
|
Make window status bar content configurable via Lua.
|
|
|
|
|
|
|
|
|
|
|
|
This should fix inconsistency in the Lua API.
|
|
Can be used to specify the number of bytes before the visible area
to consider for syntax highlighting.
Defaults to 32K for now, whereas before it was 16K.
|
|
|
|
|
|
|
|
To create a cursor even if there already exists one at the same
position. Should only be used if all but one of the cursors will
later be removed.
|
|
If there exist multiple cursors, [n/m] is added to the status bar.
Meaning the n-th cursor out of the existing m cursors is currently
the primary one.
|
|
indicating whether cursor could be removed
|
|
|
|
The number of columns i.e. maximal number of cursors located on the
same line can be obtained by view_cursors_column_count.
Column addressing is zero based, valid indexes are [0, max-1].
Assuming there is a cursor on every letter:
a
b c
d e f
g h
i
max column would be 3, and the following would iterate over the
cursors forming the second column [c, e, h]:
for (Cursor *c = view_cursors_column(view, 1); c; c = view_cursors_column_next(c, 1))
...
|
|
|
|
|
|
|
|
|
|
The currently visible display port is always adjusted
in a way that the primary cursor is visible.
|
|
That is from now on use vis:method instead of vis.method
|
|
|
|
It returns the range covered by the selection of the primary cursor.
|
|
|
|
Lua support can now be disabled at compile time using:
$ make CONFIG_LUA=0
This commit also adds an initial Lua API and provides a few
default hooks.
We now also require Lua >= 5.2 due to the uservalue constructs.
In principle the same functionality could be implemented using
function environments from Lua 5.1.
|
|
The only used event handler was used to update the '< and '>
marks which is now taken care of by the leave handler of the
visual modes.
|
|
|
|
|
|
They now belong to the cell holding the corresponding regular
(i.e. non-combining) character. This also means that at least
in theory a cell could hold arbitrary amounts of data, in
practice it is limited to 16 bytes.
|
|
|
|
|
|
|
|
The view_draw function renders the text into the cells
array and resyncs the cursor position. The syntax
highlighting is applied in view_update, which also
instructs the ui to update.
|
|
The lua based lexers are searched in the following order:
$VIS_PATH/lexers
$HOME/.vis/lexers
/usr/share/vis/lexers
followed by the standard lua package.path
|
|
|
|
|
|
|
|
|