| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
| |
In order to not conflict with new error codes that Vim adds, all Neovim
error codes should be above 5000. The three existing sub-5000 error
codes (E926, E951, and E952) are now E50003, E5004, and E5005
respectively.
E953 was removed in 6167ce6df2753d5474ad49aea19f5957128ab015, so just
remove it from the help.
|
|
|
|
|
|
|
| |
- Use a standard scratch buffer instead of a new 'buftype', functions
like curbufIsChanged() already have special handling for scratch bufs.
- Cleanup some stuff from the previous merge.
- Add support for :smagic, :snomagic. Closes #5578
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
|
|
|
| |
move `call_shell` to misc1.c
Move some fns to state.c
Move some fns to option.c
Move some fns to memline.c
Move `vim_chdir*` fns to file_search.c
Move some fns to new module, bytes.c
Move some fns to fileio.c
|
|
|
|
| |
Because the old name did not indicate that the function
would return true on directories as well.
|
|
|
|
| |
Originally there were 128 new errors, so I thought this is a good idea to fix
all of them. Of course, this commit also fixes many suppressed errors.
|
|
|
|
|
|
|
| |
Problem: ":undo 0" does not work. (Florent Fayolle)
Solution: Make it undo all the way. (closes vim/vim#688)
https://github.com/vim/vim/commit/d22e9465f6228207a4fe722ee84371c7817060d6
|
|
|
|
| |
Set \t to 8 spaces and `retab`.
|
|
|
|
|
|
|
|
| |
Problem: Marks are not restored after redo + undo.
Solution: Fix the way marks are restored. (Olaf Dabrunz)
https://github.com/vim/vim/commit/f65aad5554f1d1f972f0bd38059da70e3cdf4c87
https://github.com/vim/vim/commit/35e7594dd429f7a8a06cefd61c3e8d48b9bd74e2
|
|
|
|
|
|
| |
This header is required by POSIX for the constants (O_RDONLY, etc.)
but we were only including it on Unix systems as a side effect of
including <unistd.h>.
|
|
|
|
|
|
|
| |
Update some comments, too.
Reviewed-by: Björn Linse <bjorn.linse@gmail.com>
Reviewed-by: Michael Reed <Pyrohh@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Regarding the individual items in the header:
`Vim - Vi improved by Bram Moolenar`
Bram Moolenar is already mentioned throughout the documentation, as
well as the intro screen.
`:help uganda`
It's already shown to all users who don't use `shortmess+=I` upon
starting nvim, and is already placed prominently in help.txt, i.e.,
`:help` run with no arguments.
`:help credits`
Already mentioned near the top of help.txt.
`README.md`
Already mentioned in develop.txt.
|
| |
|
|
|
|
|
| |
The former no longer exists in this repo; see the top of
src/nvim/README.md.
|
|
|
| |
Fixes #3605
|
| |
|
|
|
|
|
|
| |
Specifically refactor u_get_undo_file_name which will be modified to
automatically create undo directory and replace `char_u` with `char` in some of
the related functions.
|
|
|
|
|
| |
Guess this is better then zero time which will give ShaDa marks the priority
almost always.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
What works:
1. ShaDa file dumping: header, registers, jump list, history, search patterns,
substitute strings, variables.
2. ShaDa file reading: registers, global marks, variables.
Most was not tested.
TODO:
1. Merging.
2. Reading history, local marks, jump and buffer lists.
3. Documentation update.
4. Converting some data from &encoding.
5. Safer variant of dumping viminfo (dump to temporary file then rename).
6. Removing old viminfo code (currently masked with `#if 0` in a ShaDa file for
reference).
|
|
|
|
|
|
| |
memory.c
os_unix.c
path.c
|
| |
|
| |
|
|\
| |
| |
| |
| |
| | |
Reviewed-by: Scott Prager <splinterofchaos@gmail.com>
Reviewed-by: Michael Reed <m.reed@mykolab.com>
Reviewed-by: Eliseo Martínez <eliseomarmol@gmail.com>
|
| | |
|
|/
|
|
|
|
|
| |
Problem: Undo files can have their executable bit set.
Solution: Strip of the executable bit. (Mikael Berthe)
https://github.com/vim/vim/commit/v7-4-707
|
|\
| |
| | |
Fix several unused variable warnings in the release build.
|
| |
| |
| |
| |
| | |
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
Reviewed-by: Eliseo Martínez <eliseomarmol@gmail.com>
|
| |
| |
| |
| |
| |
| | |
We already use wrappers for allocation, the new `xfree` function is the
equivalent for deallocation and provides a way to fully replace the malloc
implementation used by Neovim.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Resolves #1753.
https://code.google.com/p/vim/source/detail?r=v7-4-399
Reviewed-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
Helped-by: David Bürgin <676c7473@gmail.com>
Helped-by: Scott Prager <splinterofchaos@gmail.com>
Helped-by: Michael Reed <m.reed@mykolab.com>
Helped-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit integrates libvterm with Neovim and implements a terminal emulator
with nvim buffers as the display mechanism. Terminal buffers can be created
using any of the following methods:
- Opening a file with name following the "term://[${cwd}//[${pid}:]]${cmd}"
URI pattern where:
- cwd is the working directory of the process
- pid is the process id. This is just for use in session files where a pid
would have been assigned to the saved buffer title.
- cmd is the command to run
- Invoking the `:terminal` ex command
- Invoking the `termopen` function which returns a job id for automating the
terminal window.
Some extra changes were also implemented to adapt with terminal buffers. Here's
an overview:
- The `main` function now sets a BufReadCmd autocmd to intercept the term:// URI
and spawn the terminal buffer instead of reading the file.
- terminal buffers behave as if the following local buffer options were set:
- `nomodifiable`
- `swapfile`
- `undolevels=-1`
- `bufhidden=hide`
- All commands that delete buffers(`:bun`, `:bd` and `:bw`) behave the same for
terminal buffers, but only work when bang is passed(eg: `:bwipeout!`)
- A new "terminal" mode was added. A consequence is that a new set of mapping
commands were implemented with the "t" prefix(tmap, tunmap, tnoremap...)
- The `edit` function(which enters insert mode) will actually enter terminal
mode if the current buffer is a terminal
- The `put` operator was adapted to send data to the terminal instead of
modifying the buffer directly.
- A window being resized will also trigger a terminal resize if the window
displays the terminal.
|
| |
|
|
|
|
| |
Clean up said functions and some outdated comments while we're at it.
|
| |
|
|
|
|
|
|
| |
Regarding dict_lookup() in eval.c: both definitions are the same, the
only difference being the spacing between the indirection operator and
the indentation level.
|
|
|
|
|
|
|
| |
Previous commit dropped many -Wconversion warnings in both spell.c and
undo.c. spell.c still has a lot of them (200+). But in undo.c, only a
handful of them remain. Take the chance to eliminate those, too, and add
undo.c to -Wconversion checked files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove all long_u instances due to put_bytes() function.
First, function signature is changed this way:
- nr : long_u --> uintmax_t
uintmax_t is chosen so that invocations can use any unsigned integer
type (including size_t) without needing to cast.
- len : int --> unsigned int
This is to pass the size in bytes of the previous param, thus an
unsigned int is enough. All invocations use positive integer
literals, so change is safe without the need for casts.
Then, function implementation is adapted accordingly.
Last, all invocation points are refactored this way:
- Refactor types to minimize casts.
- Inline declarations (C99 style) in containing function.
All this changes were done with -Wconversion temporarily activated for
spell.c and undo.c, so that we can assert changes are type-safe and do
not introduce any warnings to that respect.
|
|
|
|
|
|
| |
FALSE was being used instead of FAIL.
They happen to have the same value, so it works the same.
But from function comment it's clear it uses the OK/FAIL convention.
|
|
|
|
|
|
|
|
|
| |
Problem : Use-after-free @ 2686.
Diagnostic : False positive.
Rationale : Suggested error path is taking false branch
`uhp->uh_next.ptr != NULL` @ 2506, which cannot happen when
`uhp == buf->b_u_oldhead`.
Resolution : Assert `buf->b_u_oldhead` is changed after freeing old one.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Also include "types.h" in os_unix.h because it declares functions that
return vim_acl_T.
|
|
|
|
|
|
|
|
|
| |
- use return value instead of open_req.result
- libuv uv_fs_open() returns `-errno` instead of always -1
- libuv always sets open_req.result to the return value, _except_ for OOM
where it only sets the return value. So always use the return value.
- replace calls to mch_open macro.
- update call sites expecting -1 error
|