| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
we already have a function for filtering by a prefix. No need for
snprintf and extra grep process for filtering.
also use simpler buffer_append for appending instead of going
through string formatting
|
|
In the command prompt, press <tab> to get a list of all available
commands and pick one (using vis-menu). This works also after typing the
first letters of a command (p.e. `:la<tab>`).
Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
|
|
These functions were only used for testing the text system. One of
them was moved to text-test.c to continue to facilitate this.
Otherwise these functions are just cluttering up the code and
making it hard to modify.
|
|
lets not make the code harder to read for no reason
|
|
When you take a pointer to a function in C that function is going
to appear in full in the final binary. This means that there were
3 sections of the final binary with the exact same code.
You could argue that in very high performance programs having that
function closer to the current instruction when it is needed will
give a performance boost but there are so many other places to
gain more significant speed ups in vis before that would be
remotely relevant.
In fact, removing these allows the buffer_append call to inlined
so that buffer_insert can be hopped to directly instead of
including a useless hop in the middle.
|
|
These are not seperate things and keeping them this way makes
gives this convoluted mess where both Wins and UiWins must have
linked lists to the other Wins and UiWins in the program despite
the fact that neither of them can exist in isolation.
This, like my previous cleanup commits, is part of a larger goal
of properly isolating the various subsystems in vis. Doing so is
required if we ever want to be able to have a vis-server and a
vis-client.
|
|
Same as previous commit each window only has a single View. No
need for it to be stored elsewhere in memory.
|
|
There only exists a single Ui so there is no need to force a
pointer redirection for accessing it.
The Ui member was moved down in vis-core.h to punt around an issue
with the way lua checks for existing objects. It may show up again
as I flatten more structs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is in response to a comment left on a35e7ea. Backwards compatibility
is a good idea for at least a release.
|
|
The first point of this commit is to allow all options to be read from
lua. This has a number of uses for plugin writers. They are grouped into
a couple of tables depending on what they control:
`vis.options`: table with global configuration
`win.options`: table with window specific configuration
The second point is to allow you to set all these options as if they
were simply lua variables. Technically this is already possible by
using `vis:command("set ...")` but personally I think this interface
is cleaner. Note that this already possible for some things like the
current mode (eg. vis.mode = vis.modes.VISUAL). Examples:
`vis.options.ai = true`
`win.options.brk = " !?."`
`win.options = { showeof = true, showtabs = true }
There are a number of related issues and pull requests:
closes #803: Lua API: let plugins read the values of options
closes #812: Window layout property
supersedes/closes #717: Add ability to access tabwidth from Lua
supersedes/closes #1066: expose UI layout and allow it to be set from lua API
|
|
this is contolled by the wrapcolumn/wc and breakat/brk options
related #142: Word wrap and line breaks
related #932: Vis for Prose?
related #1092: Disabling line wrapping
|
|
This enables restoring the terminal from a fullscreen command like
curses based program. Use cases are e.g. a file picker based on some
external program like nnn (https://github.com/jarun/nnn).
|
|
this slipped through in commit 6be370d
|
|
Fixes #1060 - :help doesn't display mappings starting with <Space>
correctly
Co-authored-by: Randy Palamar <palamar@ualberta.ca>
|
|
|
|
This makes it thread safe. While it is unlikely that we use threads in
the near future, it is sensible to avoid unnecessary global state.
|
|
Add a global ignorecase boolean option. When set add REG_ICASE to cflags
when calling text_regex_compile().
|
|
|
|
This can for example be used to abort git commit messages with :q! 1.
|
|
This introduces a new `set` option for setting the layout to
vertical or horizontal, which previously could not be done
without creating a new window (via `split` or `vsplit`).
Now, `set layout|lay h|v` will control this without creating
a new window.
|
|
Valid values are `read`, `mmap` or `auto`.
|
|
Conflicts:
view.c
view.h
|
|
|
|
|
|
Rename some structures, add typedefs for function pointers, remove unused
arguments from vis_run.
|
|
|
|
This should fix the ressource leak as found by CID 142510.
|
|
|
|
|
|
It is no longer possible to change the used syntax by assigning to the
`win.syntax = name` field, instead the function win:set_syntax(name)`
should be called.
The distinction between filetype and syntax lexer to use should probably
be clarified/cleaned up at some point.
|
|
|
|
The intention of this is not to slowly reimplement curses but to provide
a minimal working terminal UI backend which can also be used for debugging,
fuzzing and in environments where curses is not available.
Currently no attempt is made to optimize terminal output. The amount of
flickering will depend on the smartness of your terminal emulator.
|
|
It does not really fit into the style of the rest of
the command language. Eventually we should be able
to express this kind of thing using a looping construct
based on the `X` and `Y` commands.
|
|
Fix #505
|
|
$ ./configure --disable-help
shrinks the binary by about 20K on a x86_64 system.
|
|
|
|
|
|
|
|
The argument needs to be a valid regular expression. It currently
clobbers the last used search term and hence allows repeated searches
using `n` and `N` respectively.
|
|
Terminal.app sets $TERM=xterm-256color and ships a corresponding
terminfo description advocating that it is capable of color changes
to the 256 color palette when in fact it can not.
We introduce a new boolean option "change-256colors" which is
true by default but can be used to disable color changes. It is
automatically set if Terminal.app is detected using $TERM_PROGRAM.
This should fix display artifacts as described in #456.
|
|
While memory consumption should be improved, backward searches
will still be slow, because they are implemented in terms of
repeated forward searches. It needs to be investigated whether
the underlying automaton can have its transitions reversed and
essentially run backwards, as is the case in sam.
|