| Age | Commit message (Collapse) | Author | Files | Lines |
|
This removes the function pointer interface which was adding
needless complexity and making it difficult to add new events. Now
if new events are only meant for lua they only need to be added to
the lua interface. This will also have a minor reduction in
runtime memory usage and produce a smaller binary.
The only runtime difference is that QUIT happens after all windows
have been closed and their files freed.
|
|
Change the file displayed in a window by writing the new file name
to the window's file member.
This is useful to change the displayed file during events.
Using the edit command during an event caused by a pervious edit
command causes a double free.
|
|
This allows better control over styling, as well as potential for
entirely new UI elements implemented entirely using the Lua API.
|
|
|
|
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
|
|
Reading from curs_refresh(3X) from curses, calling doupdate() repeatedly
will cause 'several bursts of output to the screen'. wnoutrefresh() has
the smarts to only copy the changed lines to the copied virtual screen,
but doupdate() does not.
There have been several bug reports related to flickering but all seems
to be inconsistenly reproducible due to different terminal buffering
behavior. See #1032, #327
Unfortunately, when I am using a slow display, I still notice
flickering, so this commit changes the routines for opening new windows
and splitting windows to wait until the last change is finished before
calling doupdate().
|
|
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).
|
|
the message window gets closed like a normal window and nothing calls
this function. In fact, it wasn't even used when it was added 8 years
ago in 979ab79.
|
|
This was missed when pairwise selection combinators were removed in
404bb95..d1d5853.
|
|
|
|
|
|
These are currently not mapped by default but can be enabled by mappings
using their virtual key names.
|
|
This renames the functions and constants implementing the to/till motions.
The new names should indicate that matches are only returned within the
current line (not globally). Apart from the changed virtual key/command
name this contains no functional changes.
|
|
|
|
|
|
|
|
|
|
|
|
Use :, which is a short hand for :0,$ instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Use visual mode and :| to filter text through external commands.
The mapping was already reused for selection complement.
|
|
This should also fix coverity issue 157024.
|
|
Also expose all register slots through the Lua API.
|
|
|
|
We now use ' to refer to marks. Mark a is set using 'am and restored
using 'aM while this is slightly harder to type than ma and 'a it is
consistent with register usage for yank/put and allows a default
mark to be used which is handy for quick selection manipulation
primitives.
|
|
The key binding remain the same, but the selections are now stored on
a per-buffer basis.
|
|
This window local register holds the last active selections.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rename some structures, add typedefs for function pointers, remove unused
arguments from vis_run.
|
|
|
|
|
|
Now that register.h is no longer used by view.h we can move the struct
and function declarations to vis-core.h.
|
|
|
|
Use something like dos2unix(1) and unix2dos(1), if you
need to edit such files.
|
|
Some people might prefer this for <Backspace> behavior. Except for that
and debugging purposes using `ga` and `g8` it is not yet that useful.
|
|
The following key mappings should result in the vi behavior:
:map! normal n <vis-motion-search-repeat>
:map! normal N <vis-motion-search-repeat-reverse>
The default remains unchanged, that is `n` (`N`) always searches towards
the end (start) of the file.
Fix #470
|