| Commit message (Collapse) | Author | Age |
... | |
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Initial work by:
Robin Elrharbi-Fleury (Robinhola)
Audrey Rayé (Adrey06)
Philémon Hullot (DesbyP)
Aymeric Collange (aym7)
Clément Guyomard (Clement0)
Major revisions by:
KillTheMule
Björn Linse <bjorn.linse@gmail.com>
Justin M. Keyes <justinkz@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add tests for undotree().
Helped-by: Björn Linse <bjorn.linse@gmail.com>
When "curhead" points to a valid head, the value of "newhead" is
meaningless (and really should be set to null). The undo state for
a buffer is _logically_ the enum:
enum UndoState {
CurrentHead(head),
NewHead(head),
EmptyTree
}
nvim _represents_ this as: whenever `curbuf->b_u_curhead` is nonnull it
should be used as the current head, and `curbuf->b_u_newhead` is
ignored. If the there is a current head, then this will be redoed on the
next redo, and its parent will be undone on next undo. Only if
`b_u_curhead` is NULL, `b_u_newhead` will be used as the head to undo
(and it is not possible to redo). Also both can be NULL, to indicate an
empty undotree. (To be fair, this only strictly true when calling undo.c
from the outside, in some places _within_ a function in undo.c both
values might be meaningful)
Apparently `undotree()` breaks this non-abstraction, this _cosmetic_
issue can easily be fixed by `ex_substitute` also saving and restoring
`b_u_newhead`, but is doesn't reflect any error really how
`u_undo_and_forget` manipulates the _actual_ state of the undo tree.
|
| | |
| | |
| | |
| | |
| | | |
- Don't fill matched_lines if not showing a preview (!eap->is_live).
- Encapsulate: Move cursor placement logic to show_sub().
|
| | |
| | |
| | |
| | |
| | | |
During the live preview, the buffer-local 'modified' flag
should not be changed.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
'inccommand' allows us to expand the feature to other commands, such as:
:cdo
:cfdo
:global
Also rename "IncSubstitute" highlight group to "Substitute".
|
| | |
| | |
| | |
| | | |
This matches what Quickfix traditionally does.
|
| | |
| | |
| | |
| | |
| | |
| | | |
[inc_sub] is less obvious for users. Also, in the future we may want to
generalize the idea of a "preview buffer", or "incremental commands"
besides :substitute.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Eliminate/isolate static/global variables
- Remove special-case parameter from buflist_new()
- Remove special-case ECMD_RESERVED_BUFNR
- To determine when u_undo_and_forget() should be done, check
b_changedtick instead of a heuristic.
- use mb_string2cells() instead of strlen() to measure the :sub patterns
- call ml_close() before buf_clear_file(). Avoids leaks caught by ASan.
Original patch by:
Robin Elrharbi-Fleury (Robinhola)
Audrey Rayé (Adrey06)
Philémon Hullot (DesbyP)
Aymeric Collange (aym7)
Clément Guyomard (Clement0)
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Originally implemented by
* Clement0
* DesbyP
* aym7
* Adrey06
* Robinhola
in #4811. Major reworkings and bug
fixes by
* bfredl
Most tests suggested by ZyX-l, suggestions for improvements by oni-link.
|
| | |
| | |
| | |
| | | |
Deleted documentation was duplicated at specific utf_ implementation
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Eliminate mb_init():
Set "enc_utf" and "has_mbyte" early. Eliminate "enc_unicode" and "enc_latin1like".
init_chartab() and screenalloc() are already invoked elsewhere
in the initialization process.
The EncodingChanged autocmd cannot be triggered.
At initialization, there is no spellfiles to reload
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | | |
vim-patch:7.4.1967
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: Falling back from NFA to old regexp engine does not work properly.
(fritzophrenic)
Solution: Do not restore nfa_match. (Christian Brabandt, closes vim/vim#867)
https://github.com/vim/vim/commit/6747fabc7348bf5f41ccfe851e2be3e900ec8ee0
Helped-by: jamessan
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
rv is int64_t but its address is being passed into win_get_tabwin as if
it were an int. This breaks on big-endian systems, since win_get_tabwin
will store the data to the "wrong" half of the int64_t, thus returning
invalid data out of nvim_win_get_number.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Since data.integer is a different (larger) integer type than
data.{buffer,window,tabpage}, we cannot abuse the union by using
data.integer to access the value for all 4 types. Instead, remove the
{buffer,window,tabpage} members and always use the integer member.
In order to accomodate this, perform distinct validation and coercion
between the Integer type and Buffer/Window/Tabpage types in
object_to_vim, msgpack_rpc helpers, and gendispatch.lua.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
All options are accessed by passing char_u pointers around, casting the
pointer to the right pointer type for the specific option, and then
dereferencing that pointer.
This dance works fine on little-endian systems when some bool options
are int types (as in Vim) and some are bool types (as would make more
sense), but on big-endian systems *(int *)varp when varp is pointing to
a bool will read random memory.
Therefore, all boolean options must remain a consistent type and int is
currently the easiest to choose.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Set STDIN to blocking on "suspend". This was missed in #2598.
See 8a782f1699e2a59a3f3e91f6d7c35a3312b82b41.
Also on "continue"/SIGCONT explicitly set STDIN back to NON-blocking.
We don't explicitly do that on *startup* (libuv does it internally),
but on "continue" it seems wise to restore libuv's expectations.
Closes #5459
|
|\ \ \ \
| |_|_|/
|/| | | |
vim-patch:7.4.[1730,1734,1741,1742,1779,1782]
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: strcharpart() does not work properly with some multi-byte
characters.
Solution: Use mb_cptr2len() instead of mb_char2len(). (Hirohito Higashi)
https://github.com/vim/vim/commit/fca66003053f8c0da5161d1fe4b75b3a389934b5
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: Using negative index in strcharpart(). (Yegappan Lakshmanan)
Solution: Assume single byte when using a negative iindex.
https://github.com/vim/vim/commit/73dfe917ba6357413aaf98a021c91add5ac6e9bc
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: strgetchar() does not work correctly.
Solution: use mb_cptr2len(). Add a test. (Naruhiko Nishino)
https://github.com/vim/vim/commit/5d18e0eca59ffbba22c7f7c91c9f99d672095728
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: Not testing utf-8 characters.
Solution: Move the right asserts to the test_expr_utf8 test.
https://github.com/vim/vim/commit/b22bd46b9681d73d095f2eadff8163d3a6cf416b
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: Test fails when not using utf-8.
Solution: Split test in regularand utf-8 part.
https://github.com/vim/vim/commit/0f518a8f4d4be4cac10389680f6bd5e3781f94b0
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: It is not easy to get a character out of a string.
Solution: Add strgetchar() and strcharpart().
https://github.com/vim/vim/commit/58de0e2dcc1f2d251b74892a06d71a14973f3187
|
| | | | |
|
| |_|/
|/| |
| | |
| | |
| | | |
Problem: If CTRL-C is mapped, it does not interrupt :global output.
Solution: clear `mapped_ctrl_c` during :global.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
API level is disconnected from NVIM version. The API metadata holds the
current API level, and the lowest backwards-compatible level supported
by this instance.
Release 0.1.6 is the first release that reports the Nvim version and API
level.
metadata['version'] = {
major: 0,
minor: 1,
patch: 6,
api_level: 1,
api_compatible: 0,
api_prerelease: false,
}
The API level may remain unchanged across Nvim releases if the API has
not changed.
When changing the API,
- set NVIM_API_PRERELEASE to true
- increment NVIM_API_LEVEL (at most once per Nvim version)
- adjust NVIM_API_LEVEL_COMPAT if backwards-compatibility was broken
api_level_0.mpack was generated from Nvim 0.1.5 with:
nvim --api-info
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The API level is disconnected from the NVIM version. The API metadata
holds the current API level, and the lowest backwards-compatible level
supported by this instance.
Release 0.1.6 will be the first release reporting the Nvim version and
API level.
metadata['version'] = {
major: 0,
minor: 1,
patch: 6,
prerelease: true,
api_level: 1,
api_compatible: 0,
}
The API level may remain unchanged across Neovim releases if the API has
not changed.
When changing the API the CMake variable NVIM_API_PRERELEASE is set to
true, and NVIM_API_CURRENT/NVIM_API_COMPATIBILITY are incremented
accordingly.
The functional tests check the API table against fixtures of past
versions of Neovim. It compares all the functions in the old table with
the new one, it does ignore some metadata attributes that do not alter
the function signature or were removed since 0.1.5. Currently the only
fixture is 0.mpack, generated from Neovim 0.1.5 with nvim --api-info.
|
|\ \ \
| | | |
| | | |
| | | | |
Closes #5246
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: Crash when autocommand moves to another tab. (Dominique Pelle)
Solution: When navigating to another window halfway the :edit command go
back to the right window.
https://github.com/vim/vim/commit/5a49789a9b1f6447aeafbbbdd5b235dd10c471d5
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: Crash when doing tabnext in a BufUnload autocmd. (Dominique Pelle)
Solution: When detecting that the tab page changed, don't just abort but
delete the window where w_buffer is NULL.
https://github.com/vim/vim/commit/11fbc2866ccc11b4dd1726abdaf582a78ef3f743
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: Can't use "." and "$" with ":tab".
Solution: Support a range for ":tab". (Hirohito Higashi)
https://github.com/vim/vim/commit/9b7f8ce9eb3cb704f8cc14ab659bf86b1d6dc13c
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Mark " is not set when closing a window in another tab. (Guraga)
Solution: Check all tabs for the window to be valid. (based on patch by
Hirohito Higashi, closes vim/vim#974)
https://github.com/vim/vim/commit/e59215c7dcae17b03daf39517560cfaa03314f5a
|
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Memory leak when saving for undo fails.
Solution: Free allocated memory. (Hirohito Higashi)
https://github.com/vim/vim/commit/1e2258297bb31720bfbeb234f2dae4d1b3b04fbd
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Closes #5449
A file containing the string "vim" followed by a very large number in a modeline
location will trigger an overflow in getdigits() which is called by
chk_modeline() when trying to parse the version number.
Add getdigits_safe(), which does not assert overflows, but reports them to the
caller.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
vim-patch:7.4.2109
Problem: Setting 'display' to "lastline" is a drastic change, while
omitting it results in lots of "@" lines.
Solution: Add "truncate" to show "@@@" for a truncated line.
https://github.com/vim/vim/commit/ad9c2a08f0509294269a2f11a59a438b944bdd5a
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
msg_putchar() is not updating msg_col, this causes an infinite loop. Observed
with execute('version') *nested* in another execute(), in particular this line:
let buildtype = matchstr(execute('version'), '\v\cbuild type:?\s*[^\n\r\t ]+')
when called by :CheckHealth (see runtime/autoload/health/nvim ..
s:check_performance()).
But invoking some variation of execute('...execute("version")') is not enough to
provoke the bug, maybe it needs to be in a user function?
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Helped-by: Daniel Hahler <git@thequod.de>
|
| |/
|/|
| |
| | |
TODO: Also spec behavior of Press-Enter prompt for these API functions.
|