| Age | Commit message (Collapse) | Author | Files | Lines |
|
A new Makefile target `luadoc` has been added which generates
HTML documentation in the doc subfolder using ldoc(1) from
https://stevedonovan.github.io/ldoc/
There are still a few problems to resovle, for example the links (e.g.
in parameter lists) to our custom types seem to be broken.
At this point only the C part of the Lua API is covered and even
that is not yet complete.
|
|
Reject invalid cursor positions.
|
|
|
|
File type detection works as follows:
1) strip off suffixes to be ignored and test against a
set of known file extensions
2) run `file -bL --mime-type` and check against a set
of known mime types
3) read out the first few bytes of the file and pass
them to custom Lua file type detection functions
For now the configured file extensions are literal strings
which are matched against the end of the file name. Maybe
we should use Lua patterns instead.
We will need to add more mime types to our mapping table.
For now only the `bash` file type was associated with the
text/x-shellscript mime type.
|
|
This avoids warnings like: "_FORTIFY_SOURCE requires
compiling with optimization".
|
|
Only accept numbers in range [0, INT_MAX]. Reject trailing garbage,
where before something like `:set cc 50NaN` worked it will now cause
an error.
Close #418
|
|
The version substitution does not seem to work with BSD make
because ${VERSION} is expanded to an empty string.
|
|
Uses mandoc(1) to generate manual pages in HTML format.
|
|
|
|
They now pass `mandoc -Tlint` (the BSD manpage renderer) and `man
--warnings=w` (the GNU one).
|
|
|
|
Conflicts:
vis.1
|
|
macOS might also have $DISPLAY defined but neither of xclip
nor xsel available. Keep trying different methods until
we succeeded or ran out of options.
Fix #417
|
|
Using the installation date might be misleading and harms
reproducible builds. Omitting the dates completely might
be dangerous because it seems to be a required field:
The only firm requirement of the mdoc prologue is that
the Dd macro comes first: many formatting systems will
read up to the first macro to determine the formatting
language. If Dd is not encountered first, the mdoc format
may not be recognised.
http://manpages.bsd.lv/mdoc.html
|
|
When a file is opened in multiple windows we could end up in an
inconsistent state by doing:
$ vis some-file
:spl
:e
At this point the two windows were referencing different file objects
thus changes in one would not affect the other although they have
the same path.
Another option would be to reload all windows currently displaying
the file being reloaded. We opt for the simpler fix for now.
|
|
|
|
|
|
|
|
|
|
Close #407
|
|
|
|
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.
|
|
|
|
This is already taken care of by libtermkey. Also we did not check
whether we actually had a valid state to restore.
|
|
If the caller of vis_pipe is not interested in the output, redirect it
to /dev/null and close the pipe. Otherwise we would wait for possible
output (which might never arrive) only to throw it away.
As a consequence background processes can now be started with:
:> { plumber <&3 3<&- & } 3<&0 2>&-
whereas before one also had to explicitly close stdout:
:> { plumber <&3 3<&- & } 3<&0 1>&- 2>&-
|
|
libtermkey's initialization routine tries to write to the underlying
file descriptor which fails with EBADF if it is opened read only.
This was a problem in the terminal restore code called after a shell
command is executed.
It should fix the following:
$ echo foo | vis - > bar
:!/bin/sh
exit
where before vis would no longer accept any input.
|
|
The `:!` command did redirect stdout to a pipe which was used by
`vis-menu` to return the selected entry. However, this breaks
other interactive commands such as `:!/bin/sh` where command
output was never displayed. Instead we modified `vis-menu` to
re-open /dev/tty for its user interface which makes it work
as a regular filter `:|`
This patch also obsoletes the interactive flag previously passed
to the vis_pipe function. Interactive mode is instead enabled
by piping an invalid range.
|
|
This means vis-menu will also work when stderr is used for other purposes.
This will be used by the vis editor:
- stdin is used for the initial completion candidates
- stdout is used to return the selected entry
- stderr is used for error reporting
|
|
Make the delay used to distinguish between an <Escape> key and
other terminal escape sequences such as for the Meta key run
time configurable. The value is given in miliseconds and defaults
to 50ms.
Notice that terminal multiplexers like dvtm or tmux might also
induce some delay which has to be configured independently.
|
|
We are no longer using curses for input handling, hence this
code is obsolete.
|
|
|
|
The path argument will be nil.
|
|
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.
|
|
The passed path can be different from file.name for instance when
opening a file `a` and then doing `:w b` where file.name will be the
former and path the latter.
|
|
Indicating that the event is triggered *after* a successfull write.
|
|
|
|
Except for special commands like `w` and `wq` treat the cursor
as an implicit one character selection to which the command is
applied.
|
|
|
|
|
|
|
|
|
|
No functional changes.
|
|
Might be enough to get the sam based tests to run.
|
|
Avoid the additional spam for now.
|
|
|
|
%m is the decimal month value, not the day of the month.
|
|
With a single $, make will try to expand it as a variable.
|
|
The scheme syntax highlighting wasn't highlighting base functions, this fixes it.
|
|
|