| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
| |
Problem: When using ":ownsyntax" spell checking is messed up. (Issue 78)
Solution: Use the window-local option values. (Christian Brabandt)
https://github.com/vim/vim/commit/v7-4-524
See also https://code.google.com/p/vim/issues/detail?id=78
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Problem: When 'ruler' is set the preferred column is reset. (Issue 339)
Solution: Don't set curswant when redrawing the status lines.
https://code.google.com/p/vim/source/detail?r=v7-4-659
Helped-by: David Bürgin <676c7473@gmail.com>
Based on #2347 by @pvinis
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These options were never implemented in Vim. They are documented under
|missing-options| in runtime/doc/vi_diff.txt:
'autoprint'
'beautify'
'flash'
'graphic'
'hardtabs'
'mesg'
'novice'
'open'
'optimize'
'redraw'
'slowopen'
'sourceany'
'w300'
'w1200'
'w9600'
References #2548.
|
|
|
|
|
|
|
| |
Problem: Missing change in one file.
Solution: Also change option.c
https://github.com/vim/vim/releases/tag/v7-4-711
|
| |
|
| |
|
|
|
|
|
|
| |
Without the casts*, the compiler rightly warns about the os_getenv
losing the qualifier. This refactor adds a variable to manage this
properly, and renames the original variables to increase clarity.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
These highlight groups replace the old mechanism of setting:
- {g,b}:terminal_focused_cursor_highlight
- {g,b}:terminal_unfocused_cursor_highlight
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor summary:
- foldinfo_T.fi_lnum: int --> linenr_T
Reorder field for optimal packing.
- foldAddMarker(..., markerlen): int --> size_t
* foldstartmarkerlen: int --> size_t
- foldDelMarker(..., markerlen): int --> size_t
* foldendmarkerlen: int --> size_t
Helped-by: oni-link <knil.ino@gmail.com>
|
|
|
|
|
|
|
| |
Problem: Setting 'history' to a big value causes out-of-memory errors.
Solution: Limit the value to 10000. (Hirohito Higashi)
https://github.com/vim/vim/tree/v7-4-336
|
|
|
|
|
|
|
|
| |
Problem: Language mapping also applies to mapped characters.
Solution: Add the 'langnoremap' option, when on 'langmap' does not apply to
mapped characters. (Christian Brabandt)
https://github.com/vim/vim/releases/tag/v7-4-502
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
Also remove some MS-DOS references on lines already being touched.
Based on this commit:
https://github.com/justinmk/neovim/commit/e4db01ca8707c34dc808d7f6378aa3aba9002a2d
|
|
|
|
|
|
|
|
|
|
|
| |
This commit pulls the some environment-variable handling functions out of
misc1.c and in to os/env.c. Previously submited as #1231, this is the start of
a patch series that does that work based on a more up-to-date master branch.
Major tasks accomplished:
- move functions and fix includes
- fix clint/clang analysis warnings
- correct documentation comments
|
|
|
|
| |
Clean up said functions and some outdated comments while we're at it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Switching cursor off is only necessary in two occasions:
- When redrawing to avoid terminal flickering
- When the editor is busy
The first can now be handled by the TUI, so most calls to ui_cursor_off can be
removed from the core.
So, before this commit it was only necessary to switch the cursor off to notify
the user that nvim was running some long operation. Now the cursor_{on,off}
functions have been replaced by busy_{stop,start} which can be handled in a
UI-specific way(turning the cursor off or showing a busy indicator, for
example).
To make things even more simpler, nvim is always busy except when waiting for
user input or other asynchronous events: It automatically switches to a non-busy
state when the event loop is about to be entered for more than 100 milliseconds.
`ui_busy_start` can be called when its not desired to change the busy state in
the event loop (As its now done by functions that perform blocking shell
invocations).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Explanation:
Running `:set encoding=utf-8` _after_ startup correctly initializes
multibyte; but mb_init() was _not_ called during startup if locale
detection (enc_locale()) failed. This wasn't a problem in Vim because
the Vim default encoding (latin1) does not require mb_init(). But Nvim
defaults to utf8, so mb_init() is required.
closes #1271
closes #1672
|
| |
|
| |
|
|
|
|
|
| |
'compatible' and 'edcompatible' are forced to be off.
'ttyfast' is forced to be on.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Removed term.c, term.h and term_defs.h
- Tests for T_* values were removed. screen.c was simplified as a
consequence(the best strategy for drawing is implemented in the UI layer)
- Redraw functions now call ui.c functions directly. Updates are flushed with
`ui_flush()`
- Removed all termcap options(they now return empty strings for compatibility)
- &term/&ttybuiltin options return a constant value(nvim)
- &t_Co is still available, but it mirrors t_colors directly
- Remove cursor tracking from screen.c and the `screen_start` function. Now the
UI is expected to maintain cursor state across any call, and reset it when
resized.
- Remove unused code
|
|
|
|
| |
MacOS (pre Mac OS X) is not supported anymore.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Remove abstract_ui global, now it is always active
- Remove some terminal handling code
- Remove unused functions
- Remove HAVE_TGETENT/TERMINFO/TERMIOS/IOCTL #ifdefs
- Remove tgetent/terminfo from version.c
- Remove curses/terminfo dependencies
- Only start/stop termcap when starting/exiting the program
- msg_use_printf will return true if there are no attached UIs(
messages will be written to stdout)
- Remove `ex_winpos`(implement `:winpos` with `ex_ni`)
|
|
|
|
| |
Closes #1902
|
|
|
|
|
|
|
|
| |
refs #1045 #1051
This was enabled by default a while ago (#1051), and has apparently not
created any issues. The amount of actual code related to it is tiny, so
it has been removed.
|
|
|
|
|
|
|
|
| |
This makes it possible to highlight the lines starting with ~ at the end
of buffers and other elements highlighted using NonText.
As proposed by mhinz at
https://groups.google.com/forum/#!topic/vim_dev/p3de1iU1GXI/discussion
|
|
|
|
|
|
|
|
|
| |
Problem: Setting the local value of 'backupcopy' empty gives an error.
(Peter Mattern)
Solution: When using an empty value set the flags to zero. (Hirohito
Higashi)
https://code.google.com/p/vim/source/detail?r=v7-4-462
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem : getdigits() currently returns a long, but at most places,
return value is casted (unsafely) into an int. Making casts
safe would introduce a lot of fuss in the form of assertions
checking for limits.
Note : We cannot just change return type to int, because, at some
places, legitimate long values are used. For example, in
diff.c, for line numbers.
Solution : Introduce new functions:
- get_digits() : Gets an intmax_t from a string.
- get_int_digits() : Wrapper for ints.
- get_long_digits() : Wrapper for longs.
And replace getdigits() invocations by the appropiate
wrapper invocations.
|
| |
|
|
|
|
|
| |
Default as of Vim 7.4.336 (not yet ported). Runtime files already
mention this new default value.
|
|
|
|
|
|
|
|
| |
Problem: Tests fail with small features plus Python.
Solution: Disallow weird combination of options. Do not set "fdm" when
folding is disabled.
https://code.google.com/p/vim/source/detail?r=v7-4-538
|
|
|
|
|
|
|
| |
Problem: Cached values for 'cino' not reset for ":set all&".
Solution: Call parse_cino(). (Yukihiro Nakadaira)
https://code.google.com/p/vim/source/detail?r=v7-4-438
|
|
|
|
|
|
|
|
| |
Problem: 'backupcopy' is global, cannot write only some
files in a different way.
Solution: Make 'backupcopy' global-local. (Christian Brabandt)
https://code.google.com/p/vim/source/detail?r=v7-4-456
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A similar macro is defined in the Linux kernel [1].
To refactor the code I used a slightly modified Coccinelle script I found in
[2].
```diff
// Use the macro ARRAY_SIZE when possible
//
// Confidence: High
// Copyright: (C) Gilles Muller, Julia Lawall, EMN, DIKU. GPLv2.
// URL: http://www.emn.fr/x-info/coccinelle/rules/array.html
// Options: -I ... -all_includes can give more complete results
@@
type T;
T[] E;
@@
- (sizeof(E)/sizeof(*E))
+ ARRAY_SIZE(E)
@@
type T;
T[] E;
@@
- (sizeof(E)/sizeof(E[...]))
+ ARRAY_SIZE(E)
@@
type T;
T[] E;
@@
- (sizeof(E)/sizeof(T))
+ ARRAY_SIZE(E)
@n@
identifier AS,E;
@@
- #define AS(E) ARRAY_SIZE(E)
@@
expression E;
identifier n.AS;
@@
- AS(E)
+ ARRAY_SIZE(E)
```
`spatch --in-place --sp-file array_size.cocci -I src/ -I build/include/ -I build/src/nvim/auto/ src/nvim/*.c`
[1] http://lxr.free-electrons.com/source/include/linux/kernel.h#L54
[2] http://www.emn.fr/z-info/coccinelle/rules/#macros
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problems : Dereference of null pointer @ 6251.
Dereference of null pointer @ 6267.
Dereference of null pointer @ 6351.
Diagnostic : False positive.
Rationale : Problems occur if varp is null after
`varp = get_varp_scope(p, opt_flags);`.
That can only happen if option is hidden. Those are options
that can be set (for backwards compatibility reasons) but
that do nothing (see `:h hidden-options`,
`:h missing-options`). In particular, even if setting them
is allowed, value is not stored, so these options have no
real value.
So, suggested error paths should not occur, as checks
comparing option value and default value should discard
them.
Resolution : We could just `assert(varp)` before line 6235
`varp_local = varp;`. That was tried and worked.
But we prefer modifying the code to explicitly skip hidden
options.
A redundant `!istermoption(p)` is removed too (it's already
checked by for loop condition).
|