| Age | Commit message (Collapse) | Author | Files | Lines |
|
Move all signal handling code out of "library" code into user application.
|
|
|
|
This is already taken care of by libtermkey. Also we did not check
whether we actually had a valid state to restore.
|
|
We are no longer using curses for input handling, hence this
code is obsolete.
|
|
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.
|
|
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
|
|
|
|
|
|
|
|
When multiple selections are being displayed and the selection
orientation is changed, the complete primary selection was
wrongly colored in the style of the primary cursor.
|
|
Up until now only the background color could be changed.
|
|
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
|
|
|
|
|
|
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
|
|
|
|
Make window status bar content configurable via Lua.
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
A concrete user interface implementation should not have to depend
on libtermkey. Therefore the vis core now uses an independent instance
to parse keys.
|
|
This handles (notices the missing - at the end of the command line):
$ printf ":new\n" | vis
more gracefully. This instructs vis to read commands (not file content)
from stdin. Once all input from stdin is consumed we open /dev/tty
and start processing regular keyboard input instead.
|
|
Blinking caused more problems (#251, #202) than it solved. Blank cells
were especially problematic.
|
|
Close #224
|
|
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.
|
|
|
|
|
|
This is important for files without associated syntax highlighting.
The selections should now again be visible.
|
|
|
|
|
|
|
|
|
|
|
|
Disable absolute line numbers for large files (currently
anything bigger than 32MiB). This speeds up moving around
with for example nn% since no new lines need to be calculated.
Of course movements like :nn will be unaffected.
The optimizations can be disabled by explicitly enabling
absolute line numbers as in :set number
|
|
Display Lua errors in a dedicated window/file. A typo or missing
dependency (e.g. lpeg) in visrc.lua will no longer silently fail
without any indication.
The Lua integration in view.h is not yet converted.
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
If the current $TERM value indicates 256 color support fall back
to xterm-256color otherwise try xterm.
Improves upon 43605fded457cec954600b688d54242341eedc7c
Closes #105
|
|
This improves behaviour for unknwown/unrecognized terminals
as is the case for self contained binaries built with
"make standalone" which only includes a fixed set of terminal
descriptions.
Of course the terminal capabilities won't match, which will
likely cause some display issues.
|
|
|
|
|
|
|