aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memline.c
Commit message (Collapse)AuthorAge
* vim-patch:8.0.0736: OptionSet not triggered when entering diff modeJustin M. Keyes2018-02-11
| | | | | | | | | Problem: The OptionSet autocommand event is not triggered when entering diff mode. Solution: use set_option_value() instead of setting the option directly. Change the tests from old to new style. (Christian Brabandt) https://github.com/vim/vim/commit/04f62f881c5743d2fdaf7324f6a715381f0d5fcf
* vim-patch:8.0.0337: invalid memory access in :recover commandJustin M. Keyes2018-02-11
| | | | | | | | Problem: Invalid memory access in :recover command. Solution: Avoid access before directory name. (Dominique Pelle, closes vim/vim#1488) https://github.com/vim/vim/commit/c525e3a1c20f6b5d9809c8b84f80090a8e416c92
* lintJames McCoy2017-12-15
|
* vim-patch:8.0.0074Michael Schupikov2017-12-15
| | | | | | | | | | Problem: Cannot make Vim fail on an internal error. Solution: Add IEMSG() and IEMSG2(). (Domenique Pelle) Avoid reporting an internal error without mentioning where. https://github.com/vim/vim/commit/95f096030ed1a8afea028f2ea295d6f6a70f466f Signed-off-by: Michael Schupikov <michael@schupikov.de>
* io: more guards against NULL filename (#7159)Justin M. Keyes2017-08-13
| | | | References ac055d677aa9 References #4370
* lintJames McCoy2017-06-04
|
* vim-patch:7.4.1975James McCoy2017-06-04
| | | | | | | | | | | Problem: On MS-Windows large files (> 2Gbyte) cause problems. Solution: Use "off_T" instead of "off_t". Use "stat_T" instead of "struct stat". Use 64 bit system functions if available. (Ken Takata) https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe Only the off_T changes are relevant, since all the "struct stat" usage is abstracted by libuv.
* *: Add comment to all C filesZyX2017-04-19
|
* memline: Fix “NULL pointer dereference” warningZyX2017-04-16
| | | | It was actually a false positive indicating always-true condition, not real dereference.
* memline: Silence “buffer underflow” warning, looks like false positiveZyX2017-04-16
|
* *: Move some dictionary functions to typval.h and use char*ZyX2017-03-29
| | | | Also fixes buffer reusage in setmatches() and complete().
* job-control: set CLOEXEC on pty processes. #5986Matthew Malcomson2017-03-17
| | | | | Before this change, new processes started with libuv prevented SIGHUP from reaching pty processes (by keeping the ptmx file descriptor open).
* vim-patch:8.0.0453 (#6266)Matthieu Coudron2017-03-13
| | | | | | Problem: Adding fold marker creates new comment. Solution: Use an existing comment if possible. (LemonBoy, closes vim/vim#1549) https://github.com/vim/vim/commit/025a6b708a9bff54c73fb9c641b980da19e943a9
* buffer: Bind b:changedtick to b:['changedtick'], remove special casesZyX2017-02-23
|
* *: Partial string handling refactoringZyX2017-02-15
| | | | | | | | Main points: - Replace `char_u` with `char` in some cases. - Remove `str[len] = NUL` hack in some cases when `str` may be considered `const`.
* lintJustin M. Keyes2017-01-13
|
* open_buffer(): Do `BufEnter` for directories.Justin M. Keyes2017-01-12
| | | | | | | | | | | | | | | | | | | Abuse NOTDONE to give some nuance to the return value of readfile(), so that open_buffer() can distinguish between "failed, lol" and "failed because the path is a directory". Before this change, Vim *already* creates a new buffer when a directory is edited. So there is no reason it should not raise BufEnter, that was an implementation detail of ye olde readfile(). Most of the changes in this commit merely preserve the old semantics. The "implicit" change that we actually are interested in, is this line in `open_buffer()`, where `retval` being non-FAIL allows EVENT_BUFENTER to be applied: apply_autocmds_retval(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf, &retval); References https://github.com/vim/vim/issues/1353
* 'inccommand': reworkJustin M. Keyes2016-11-08
| | | | | | | | | | | | | | | | | - 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)
* refactor: eliminate misc2.cJustin M. Keyes2016-09-13
| | | | | | | | | | 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
* vim-patch:7.4.1237 (#5092)Simon Weil2016-07-31
| | | | | | Problem: Can't translate message without adding a line break. Solution: Join the two parts of the message. https://github.com/vim/vim/commit/d9ea9069f5ef5b8b9f9e0d0daecdd124e2dcd818
* os/fs: Rename os_file_exists to os_path_exists (#4973)Daniel Xu2016-07-06
| | | | Because the old name did not indicate that the function would return true on directories as well.
* vim-patch:7.4.1276Michael Ennen2016-05-17
| | | | | | | Problem: Warning for not using return value of fcntl(). Solution: Explicitly ignore the return value. https://github.com/vim/vim/commit/fbc4b4db3a9690906a96e16724350a6241cf32a5
* *: Fix new linter errorsZyX2016-05-01
| | | | 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.
* Merge tempfile.c back into fileio.cJurica Bradaric2016-04-20
|
* *: Make set_vim_var_\* functions have proper argument typesZyX2016-04-18
|
* Review of the memfile.c API and small refactoringsFelipe Oliveira Carvalho2016-03-16
| | | | | | | | | - Create `mf_free_fnames()` that frees and nullifies `mf_[f]fname` - Create `mf_set_fnames()` to set the `mf_fname` and the `mf_ffname` altoghether - Have `mf_do_open` return a bool to indicate success so that calles don't have to check `memfile_T::mf_fd` (file descriptor) - Inline `mf_write_block`
* Windows: Include <fcntl.h> for file constants.Seth Jackson2016-01-17
| | | | | | 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>.
* Merge #3443 'vim-patch:7.4.{785,795,898}'Justin M. Keyes2015-12-13
|\
| * vim-patch:7.4.785Johan Klokkhammer Helsing2015-11-22
| | | | | | | | | | | | | | | | Problem: On some systems automatically adding the missing EOL causes problems. Setting 'binary' has too many side effects. Solution: Add the 'fixeol' option, default on. (Pavel Samarkin) https://github.com/vim/vim/commit/34d72d4b6c1a2b04a214d8a49b7d22c97bc7a8bc
* | src/*: Remove `VIM - Vi improved ...` headerMichael Reed2015-11-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | src: README.txt -> README.mdMichael Reed2015-11-23
|/ | | | | The former no longer exists in this repo; see the top of src/nvim/README.md.
* undo: Do some refactoringZyX2015-10-29
| | | | | | 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.
* option: fix off-by-one error when handling &directoryVictor Adam2015-10-27
| | | | | | | a8e18d9 introduced an off-by-one error that caused the last character of &directory to be ignored. This commit is a straightforward fix for that error. fixes #3519
* *: Fix linter errorsZyX2015-10-23
|
* memline: Automatically create swap file directory for last directoryZyX2015-10-23
|
* vim-patch:7.4.781 #3065Marco Hinz2015-08-09
| | | | | | | | Problem: line2byte() returns one less when 'bin' and 'noeol' are set. Solution: Only adjust the size for the last line. (Rob Wu) Original patch: https://code.google.com/p/vim/source/detail?r=30c9301f33ed76d0b76b9e22362f5e78e26786da
* Remove POSIX 'cpoptions': '&'Michael Reed2015-07-19
|
* Split os_unix_defs.h into os/Yamakaky2015-07-06
|
* memline: Don't call memmove() with a NULL argument in ml_add_stack(). #2802oni-link2015-06-12
| | | | | | | | | When ml_add_stack() needs to increase the size of the empty stack, buf->b_ml.ml_stack is NULL and is used as argument in memmove(). This is undefined behaviour. Declaration of memmove() in string.h: extern void *memmove (void *__dest, const void *__src, size_t __n) __THROW __nonnull ((1, 2));
* minor cleanup. #2610Mark Bainter2015-05-13
| | | | | | | Update vim_isAbsName() to use bool type cleanup casts in vim_findfile() and recover_names() References #2470
* Remove char_u: message:smsg()Michael Reed2015-05-13
|
* Remove char_u: concat_fnames()Mark Bainter2015-05-06
|
* Remove char_u: make_percent_swname()Mark Bainter2015-05-06
|
* Remove char_u: fix_fname()Mark Bainter2015-05-06
|
* Remove char_u: vim_FullName()Mark Bainter2015-05-06
|
* Remove char_u: modname()Mark Bainter2015-05-06
|
* Remove char_u: after_pathstep()Mark Bainter2015-04-17
| | | | See: #459
* memory: Add `free` wrapper and refactor project to use itThiago de Arruda2015-04-13
| | | | | | 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.
* fix: segfault in ml_recover() if swap file not foundJustin M. Keyes2015-04-12
| | | | | - To reproduce: ":recover non_existent_swapfile" - Regression: 00f18e2e09af35494d0b94ae76a9dbc3e0319d89
* fix: segfault in recover_names(): must not concat full pathJustin M. Keyes2015-04-12
| | | | | - regression by 42f1bd9b2228aaca4fb8a5597a3b5774f7ef6876 - closes #1836