| Age | Commit message (Collapse) | Author | Files | Lines |
|
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).
|
|
|
|
Do not take snapshots after every operation in insert/replace mode.
As an example up until now we would take a snapshot after every
<Backspace>/<Delete> press, hence when undoing changes each character
would be restored individually. The same applies for <C-w> and related
actions.
From now on we only snaphost when:
- transitioning from insert/replace mode to normal mode (but not when
switching to operator pending mode)
- an operation takes place from normal mode
- an idle time expires in normal/replace mode
|
|
They both perform a motion before changing mode.
|
|
We should only attempt to parse special keys if they are
delimited by angle brackets i.e. <Key> but not Key.
Previously we would wrongly skip over the latter.
|
|
The mapped to latin key has typically a shorter UTF-8 representation,
thus explicitly copy the NUL terminator to properly truncate the new
key value.
|
|
The language map translation should not take modifiers into account.
For example if `a` is mapped to `b` then `<M-a>` should also be mapped
to `<M-b>`.
Fix #404
|
|
|
|
|
|
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 refcount is already incremented in the `window_new_file`
function, no need to do it again.
|
|
Do not override implicit operator macro in command mode.
Fix #334
|
|
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.
|
|
Except for special cases like gn and gN vis expected that a text object
would be a function mapping a position to a range as follows:
f: pos -> [start, end] with start <= f(pos) <= end
Clearly this condition does not hold for inner text objects when the
initial position i.e. the cursor is on the opening delimiter.
This also obsoletes the need for the SPLIT text object flag which should
be removed in a later commit if the current behavior is found to be
working as expected.
|
|
|
|
This is a not yet successful attempt to reduce terminal flickering
when resizing windows as is for example the case when entering
command mode.
UI related debug output can be enabled with:
$ make CFLAGS=-DDEBUG_UI=1
$ ./vis > log
|
|
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.
|
|
This is encouraged by the ISO C99 standard.
|
|
|
|
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).
|
|
|
|
This caused issues on OpenBSD where it crashed the terminal.
Also on Mac OS X suspend via ^Z (Ctrl-Z) was missing a \r i.e.
the shell prompt was not properly redrawn.
While in principle user interfaces should not have to depend on
libtermkey, in practice this won't be an issue unless we are
adding a non-terminal based UI (which won't happen anytime soon).
This reverts commit 8f92b98848f9366e78c7aa824615bade83971513.
Close #311
|
|
Close #314
|
|
|
|
|
|
A concrete user interface implementation should not have to depend
on libtermkey. Therefore the vis core now uses an independent instance
to parse keys.
|
|
They behave like an inclusive motion, but only if they are also
linewise (which they are by default).
This should make `yjp` and `ykp` yank both the current and
the next/previous line when the cursor is at the start of
a line.
See also 532f52e9e52b98dc5749396f7353295418e0227a and #237
|
|
|
|
|
|
|
|
This is needed to make the vis.event.start Lua callback useful,
setting global options should be possible even if no windows exist
yet.
The :set command options should probably be cleaned up further,
some of them apply only to the currently active window while others
have a global effect.
|
|
Close #271
|
|
|
|
The built in commands should always be available.
|
|
|
|
|
|
This means no event handlers are run for it, hence there is no chance
for recursive errors.
|
|
Should have been part of f50465312dbb7e8fcb2409aa691d1aea7a43c466.
|
|
This reverts part of bd1d849b2033b04a372542c59d458d4f8279c937
just use a literal space within your key mappings.
Close #280
|
|
|
|
This fixes interactive :-commands when the user has configured
to set custom options vis:command(...) via the Lua win_open
event handler.
The problem was that the creation of the window for the command
prompt would itself trigger an execution of a :-command. Upon
successful completion the editor would switch to normal mode.
Therefore the interactively entered command would not be applied
to the correct range.
|