| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
Libtermkey tries to write a terminal initialization sequence even when
stdin is not a terminal as is the case when running `vis < /dev/null`
or within the Travis CI environment.
The broken code is in libtermkey's driver-ti.c function `start_driver`:
/* There's no point trying to write() to a pipe */
if(fstat(tk->fd, &statbuf) == -1)
return 0;
if(S_ISFIFO(statbuf.st_mode))
return 1;
Instead they should simply be using isatty(3).
As a workaround we catch the resulting EBADF failure and try to re-open
/dev/tty as stdin. If this fails too (as is the case in the Mac OS X
Travis CI runner) create an abstract termkey instance instead. In this
state vis will not be able to consume any input and will instead spin
with 100% CPU usage in the mainloop. This is solely done to make the Lua
tests, which control vis through other means, work within the Travis CI
environment.
|
|
|
|
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.
|
|
If the shell command is omitted, the last shell command (of any type)
is substituted. The most recently used shell command is stored in a
new register currently named `!`.
|
|
As in sam if an empty regex // is provided we substitute in the most
recently used one.
0/regexp///
Will match the second occurrence in the fie.
|
|
|
|
As in visual mode write commands have to be forced with ! if the changes
are destructive i.e. only parts of the file are written.
|
|
|
|
No functional changes.
|
|
Wether `/usr/local/share/vis` or `/usr/share/vis` is used depends
on how the configure script was invoked. However, both are never
used at the same time.
This section should be completely reworked at some point.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
No longer accept "no" prefix for boolean options. Reject too many option
values (use proper quoting to specify values containing spaces).
|
|
|
|
We first try $SHELL and then fall back to the shell field of the password
file entry (/etc/passwd).
|
|
:0 < echo "Should be inserted at the start of the file"
:1 < echo "Should replace the first line"
|
|
|
|
|
|
Also rename underlying C code.
|
|
It was the only command option which needed `=` to assign a value to.
This unifies the argument parsing logic and adds the possibility to
specify a per-option help text.
You might want to adapt your visrc.lua configuration accordingly.
|
|
|
|
|
|
|
|
|
|
|
|
Do not alter the text if <Escape> is pressed instead of a regular
replacement character.
|
|
|
|
Includes the new ssam(1) based tests.
|
|
|
|
The `git describe` command fails in shallow checked out git repositories
which do not include the tag information. At least include the git short
hash.
|
|
In normal mode `r<key>` was previously implemented as `R<key><Escape>`.
However this does not work when the replacement key is `<Enter>` to insert
a new line, because in replace mode new lines are not overwritten.
The count is now also respected.
Also properly support `r` in visual mode where before it was aliased to `c`.
Fix #190
|
|
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
|
|
Delete the given range and insert the same number of replacement characters.
|
|
They both perform a motion before changing mode.
|
|
We need to distinguish between an explicit given zero and an
omitted value which should default to 1.
This should fix the following constructs which rounds up/down
an existing selection to whole lines -0,+0 and -0+,+0-
|
|
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.
|
|
Something like :{ x/pattern/ } should not leave the original
cursor around.
|