| Age | Commit message (Collapse) | Author | Files | Lines |
|
This was the only place where buffer_move was actaully doing something useful.
|
|
|
|
Buffer is fully exposed to the program, no need to rely on the
linker to optimize useless code.
|
|
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.
|
|
Same as previous commit each window only has a single View. No
need for it to be stored elsewhere in memory.
|
|
|
|
|
|
|
|
|
|
fixes #1152: `:2x/foo/<cr>` in a file with only one line makes vis
get stuck in an infinite loop
|
|
|
|
|
|
This is in response to a comment left on a35e7ea. Backwards compatibility
is a good idea for at least a release.
|
|
|
|
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).
|
|
fixes #971
|
|
When the cmd closes the window the window pointer gets freed along the
way. We can't use win->next to update the loop variable if sam_execute()
has been called. Instead we can store win->next early and use that
variable to continue the loop.
fixes #1090
|
|
Should be no functional change, just a simpler implementation.
|
|
In sam(1) a command like x/[a-z]+/ y/-?/ matches every character
individually, whereas in vis it would produce a zero length match before
each character as is correctly the case for the x counter part.
|
|
In certain cases (e.g. involving negated character classes) the last
empty match of an x command would wrongly be skipped.
See #925
|
|
This further tweaks the hack introduced to ignore the last match of ^
at the end of the file, see 1a158268c7693b00bf43c7e81034816d8d00358c.
|
|
|
|
|
|
Add a global ignorecase boolean option. When set add REG_ICASE to cflags
when calling text_regex_compile().
|
|
The standard does not specify mkstempat(3). We currently implement it
in a non thread safe manner, by temporarily changing the process working
directory before invoking mkstemp(3).
|
|
|
|
|
|
Fix #820
|
|
When initially opened with a non-existing file we would not correctly
track the file's meta data resulting in spurious warnings upon subsequent
writes.
It is fixed by also saving the meta data for previously non-existing
files with matching paths.
|
|
Add ! to override.
|
|
The modification time should only be compared when dealing with the
same file i.e. the following should work without a warning:
$ touch foo; sleep 1; touch bar
$ vis foo
:w bar
Also switch from path to inode based file equality testing.
|
|
A vis.events.FILE_SAVE_PRE callback may mutate the file text,
making the original range passed to cmd_write incorrect.
It is unclear how to realign the range after the callback
is done for the cases where an active selection in visual mode
is present or an explicit range like :1,2w! was specified.
However, this commit resolves the issue for the case where
the whole file is expected to be written.
|
|
The text given for the a, i and c commands can be prefixed with an
optional count indicating how often the text should be inserted,
defaults to 1.
|
|
|
|
This can for example be used to abort git commit messages with :q! 1.
|
|
|
|
Previsouly a command like:
x/^.*\n/
would only select every second line.
Fixes #774
|
|
No need to explicitly specify "lay" as an abbreviation,
since "layout" already makes it available via prefix logic.
|
|
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`.
|
|
|
|
As a trivial example if multiple selections exist running a command like
:,
should merge them.
|
|
|
|
Fix #700
|
|
|
|
With POSIX ERE the pattern ^$ matches strings ending with a new
line because an empty match is reported after the trailing newline
at the very end of the input.
This is undesirable for use cases like
x g/^$/ d
which is supposed to delete all empty lines of a file.
As a fix we disregard empty matches at the end of the given range.
|
|
|
|
|