aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
Commit message (Collapse)AuthorAge
...
* vim-patch:8.1.0205: invalid memory access with invalid modelineJan Edmund Lazo2019-05-25
| | | | | | Problem: Invalid memory access with invalid modeline. Solution: Pass pointer limit. Add a test. (closes vim/vim#3241) https://github.com/vim/vim/commit/9cf4b5005f12ce1d6692266140bdda05d0312d79
* vim-patch:8.1.1046: the "secure" variable is used inconsistentlyJan Edmund Lazo2019-05-05
| | | | | | Problem: the "secure" variable is used inconsistently. (Justin M. Keyes) Solution: Set it to one instead of incrementing. https://github.com/vim/vim/commit/82b033eff82d3ed0da77fd5f5a1c023766acabba
* vim-patch:8.1.0613: when executing an insecure function the secure flag is stuckJan Edmund Lazo2019-05-05
| | | | | | | Problem: When executing an insecure function the secure flag is stuck. (Gabriel Barta) Solution: Restore "secure" instead of decrementing it. (closes vim/vim#3705) https://github.com/vim/vim/commit/48f377a476e4a3312aa0e3535aba170484b59483
* win/defaults: Use "…/nvim-data/site" in 'runtimepath'Justin M. Keyes2019-04-28
| | | | | | | | | | On Windows we store non-config data in "$XDG_DATA_HOME/nvim-data". But the "…/site" items in 'runtimepath' did not correctly point to that location, they used "…/nvim/site". Fix the init logic to use "…/nvim-data/site". closes #9910
* vim-patch:8.0.0702: error in a timer can make Vim unusable #9826Justin M. Keyes2019-04-10
| | | | | | | | | | Problem: An error in a timer can make Vim unusable. Solution: Don't set the error flag or exception from a timer. Stop a timer if it causes an error 3 out of 3 times. Discard an exception caused inside a timer. https://github.com/vim/vim/commit/c577d813b7978345dec4310b2d8f5d5624a681f6 closes #9826
* lintJames McCoy2019-04-08
|
* Remove MSVC optimization workaround for SHM_ALLJames McCoy2019-04-08
|
* Make SHM_ALL to a variable instead of a compound literal #defineJames McCoy2019-04-07
| | | | | | | | | | | | | | | gcc-9 has [improved compliance] with the C spec for lifetime of compound literals, tying their lifetime to block scope instead of function scope. This makes the behavior comparable to all other automatic variables. Using the SHM_ALL #define instantiated a compound literal local to an if clause and assigned the address to a "char_u *". Since the pointer was then being used outside of the if clause, it was using an invalid address. [improved compliance]: https://gcc.gnu.org/gcc-9/porting_to.html#complit Closes #9855
* fixup: use vim_snprintf, ASCII_ISALNUMAbdelhakeem2019-03-29
| | | | ASCII_ISALNUM is part of vim-patch:8.1.0540
* lintAbdelhakeem2019-03-29
|
* vim-patch:8.1.0544: setting 'filetype' in a modeline causes an errorAbdelhakeem2019-03-28
| | | | | | | | Problem: Setting 'filetype' in a modeline causes an error (Hirohito Higashi). Solution: Don't add the P_INSECURE flag when setting 'filetype' from a modeline. Also for 'syntax'. https://github.com/vim/vim/commit/916a818cea5ba05a5f2117407674461b8bee6832
* vim-patch:8.1.0540: may evaluate insecure value when appending to optionAbdelhakeem2019-03-28
| | | | | | | | Problem: May evaluate insecure value when appending to option. Solution: Set the secure flag when changing an option that was previously set insecurely. Also allow numbers for the characters from 'spelllang' that are used for LANG.vim. https://github.com/vim/vim/commit/247bb7e43b47eb8407a1111bed60b61aceda52ad
* vim-patch:8.1.0539: cannot build without the sandboxAbdelhakeem2019-03-28
| | | | | | | | Problem: Cannot build without the sandbox. Solution: Set the secure option instead of using the sandbox. Also restrict the characters from 'spelllang' that are used for LANG.vim. (suggested by Yasuhiro Matsumoto) https://github.com/vim/vim/commit/82e8c92ebef5afcac0c0fdb706ff163f9b3366f7
* signs: support multiple columns #9295Dan Aloni2019-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | closes #990 closes #9295 - Support for multiple auto-adjusted sign columns. With this change, having more than one sign on a line, and with the 'auto' setting on 'signcolumn', extra columns will shown automatically to accomodate all the existing signs. For example, suppose we have this view: 5147 } 5148 5149 return sign->typenr; 5150 } 5151 } 5152 return 0; 5153 } 5154 We have GitGutter installed, so it tells us about modified lines that are not commmited. So let's change line 5152: 5147 } 5148 5149 return sign->typenr; 5150 } 5151 } ~ 5152 return 0; 5153 } 5154 Now we add a mark over line 5152 using 'ma' in normal mode: 5147 } 5148 5149 return sign->typenr; 5150 } 5151 } a ~ 5152 return 0; 5153 } 5154 Previously, Vim/Nvim would have picked only one of the signs, because there was no support for having multiple signs in a line. - Remove signs from deleted lines. Suppose we have highlights on a group of lines and we delete them: + 6 use std::ops::Deref; --+ 7 use std::borrow::Cow; --+ 8 use std::io::{Cursor}; 9 use proc_macro2::TokenStream; 10 use syn::export::ToTokens; --+ 11 use std::io::Write; >> 12 use std::ops::Deref; Without this change, these signs will momentarily accumulate in the sign column until the plugins wake up to refresh them. + --+ --+ --+ >> 6 Discussion: It may be better to extend the API a bit and allow this to happen for only certain types of signs. For example, VIM marks and vim-gitgutter removal signs may want to be presreved, unlike line additions and linter highlights. - 'signcolumn': support 'auto:NUM' and 'yes:NUM' settings - sort signs according to id, from lowest to highest. If you have git-gutter, vim-signature, and ALE, it would appear in this order: git-gutter - vim-signature - ALE. - recalculate size before screen update - If no space for all signs, prefer the higher ids (while keeping the rendering order from low to high). - Prevent duplicate signs. Duplicate signs were invisible to the user, before using our extended non-standard signcolumn settings. - multi signcols: fix bug related to wrapped lines. In wrapped lines, the wrapped parts of a line did not include the extra columns if they existed. The result was a misdrawing of the wrapped parts. Fix the issue by: 1. initializing the signcol counter to 0 when we are on a wrap boundary 2. allowing for the draw of spaces in that case.
* Allow using internal popupmenu or ext_popupmenu for wildmenuBjörn Linse2019-03-16
| | | | | Deprecate ext_wildmenu. ext_popupmenu already contains more state (anchor position), and will allow further expansion (info about items).
* vim-patch:8.1.0932: remove Farsi support (#9622)Justin M. Keyes2019-02-17
| | | | | Problem: Farsi support is outdated and unused. Solution: Delete the Farsi support. https://github.com/vim/vim/commit/14184a3133b9a6ee5f711d493c04e41ba4fa7c2f
* ui: implement ext_messagesBjörn Linse2019-02-10
| | | | Co-Author: Dongdong Zhou <dzhou121@gmail.com>
* UI: implement 'pumblend' option for semi-transparent popupmenuBjörn Linse2019-02-07
| | | | | | | | | | | | | Why? - Because we can. - Because the TUI is just another GUI™ - Because it looks kinda nice, and provides useful context like 1 out of 100 times Complies with "don't pay for what you don't use". Some crashes for resizing were unfolded, add tests for those.
* options: set 'scrollback' to -1 by default #9563Marco Hinz2019-02-04
| | | | | | | | | Makes the 'scrollback' option more consistent (same default for all buffers) and future-proof. - Default to -1 for all buffers, but treat it as an implementation detail. - Document range of 1 - 100_000. - New terminal buffer by default sets scrollback=10_000 if the global default is -1. - Existing terminal buffer: On entering terminal-mode or on refresh, if the user explicitly did `:set[local] scbk=-1`, the local value goes to 100_000 (max). (This is undocumented on purpose. Users should work with explicit values in the range of 1-100_000.)
* Merge #9539 "options: make 'listchars' and 'fillchars' local to window"Marco Hinz2019-01-28
|\
| * vim-patch:8.1.0759: showing two characters for tab is limitedMarco Hinz2019-01-26
| | | | | | | | | | | | | | | | Problem: Showing two characters for tab is limited. Solution: Allow for a third character for "tab:" in 'listchars'. (Nathaniel Braun, Ken Takata, closes vim/vim#3810) https://github.com/vim/vim/commit/83a52171ba00b2b9fd2d1d22a07e38fc9fc69c1e
| * linter: fix issuesMarco Hinz2019-01-26
| |
| * options: make 'fillchars'/'listchars' local to windowMarco Hinz2019-01-26
| | | | | | | | | | | | | | | | | | | | Using 'listchars' is a nice way to highlight tabs that were included by accident for buffers that set 'expandtab'. But maybe one does not want this for buffers that set 'noexpandtab', so now one can use: autocmd FileType go let &l:listchars .= ',tab: '
* | terminal: simplify sizing logicBjörn Linse2019-01-27
|/
* vim-patch:8.0.0251: not easy to select Python 2 or 3 (#9173)David Jimenez2019-01-02
| | | | | | Problem: It is not so easy to write a script that works with both Python 2 and Python 3, even when the Python code works with both. Solution: Add 'pyxversion', :pyx, etc. (Marc Weber, Ken Takata) https://github.com/vim/vim/commit/f42dd3c3901ea0ba38e67a616aea9953cae81b8d
* cleanup: Remove os_term_is_nice()Justin M. Keyes2018-12-30
|
* ui_options: also send when starting or from OptionSetBjörn Linse2018-11-08
| | | | needed after #9024 to receive options from init.vim
* vim-patch:8.1.0510: filter test fails when $LANG is C.UTF-8Jan Edmund Lazo2018-11-05
| | | | | | | Problem: Filter test fails when $LANG is C.UTF-8. Solution: Set 'helplang' to "en" for any C language. (Christian Brabandt, closes vim/vim#3577) https://github.com/vim/vim/commit/dcd71cbaedf75dd8e5c5a45c5c2e3ec7ee552dce
* ui: disable clearing almost everywhereBjörn Linse2018-10-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid clearing the screen in most situations. NOT_VALID should be equivalent to CLEAR unless some external force messed up the terminal, for these situations <c-l> and :mode will still clear the screen. Also eliminate some obsolete code in screen.c, that dealt with that in vim drawing window 1 can mess up window 2, but this never happens in nvim. But what about slow terminals? There is two common meanings in which a terminal is said to be "slow": Most commonly (and in the sense of vim:s nottyfast) it means low bandwidth for sending bytes from nvim to the terminal. If the screen is very similar before and after the update_screen(CLEAR) this change should reduce bandwidth. If the screen is quite different, but there is no new regions of contiguous whitespace, clearing doesn't reduce bandwidth significantly. If the new screen contains a lot of whitespace, it will depend of if vsplits are used or not: as long as there is no vsplits, ce is used to cheaply clear the rest of the line, so full-screen clear is not needed to reduce bandwith. However a left vsplit currently needs to be padded with whitespace all the way to the separator. It is possible ec (clear N chars) can be used to reduce bandwidth here if this is a problem. (All of this assumes that one doesn't set Normal guibg=... on a non-BCE terminal, if you do you are doomed regardless of this change). Slow can also mean that drawing pixels on the screen is slow. E-ink screens is a recent example. Avoiding clearing and redrawing the unchanged part of the screen will always improve performance in these cases.
* vim-patch:8.1.0067: syntax highlighting not working when re-entering a bufferJan Edmund Lazo2018-09-30
| | | | | | Problem: Syntax highlighting not working when re-entering a buffer. Solution: Do force executing autocommands when not called recursively. https://github.com/vim/vim/commit/a5616b0136cea2104a475d143a1685d71e9b2d3d
* vim-patch:8.1.0066: nasty autocommand causes using freed memoryJan Edmund Lazo2018-09-30
| | | | | | | Problem: Nasty autocommand causes using freed memory. (Dominique Pelle) Solution: Do not force executing autocommands if the value of 'syntax' or 'filetype' did not change. https://github.com/vim/vim/commit/c3ffc9b8d3015dc5280b297b4e3deb4f34944bd4
* vim-patch:8.1.0435: cursorline highlight not removed in some situation (#9059)Justin M. Keyes2018-09-27
| | | | | | | Problem: Cursorline highlight not removed in some situation. (Vitaly Yashin) Solution: Reset last_cursorline when resetting 'cursorline'. (Christian Brabandt, closes vim/vim#3481) https://github.com/vim/vim/commit/8c63e0ec314ba07d54b881dc629fe19e6eda1fb8
* vim-patch:8.0.0370: invalid memory access when setting wildchar emptyJan Edmund Lazo2018-09-23
| | | | | | | | Problem: Invalid memory access when setting wildchar empty. Solution: Avoid going over the end of the option value. (Dominique Pelle, closes vim/vim#1509) Make option test check all number options with empty value. https://github.com/vim/vim/commit/a12e40351d1357687e8b5dc3122fffef705bdc08
* vim-patch:8.1.0414: v:option_old is cleared when using :set in OptionSet autocmdJan Edmund Lazo2018-09-22
| | | | | | | Problem: v:option_old and v:option_new are cleared when using :set in OptionSet autocmd. (Gary Johnson) Solution: Don't trigger OptionSet recursively. https://github.com/vim/vim/commit/3f3fb0b14734272e7c817020c847aaa0fba5cea5
* style: fixing minor issues noted in code review.ZviRackover2018-08-06
|
* lint: clean-up after parent commitZviRackover2018-08-06
|
* Remove all occurences of the mb_ptr2char macroZviRackover2018-08-06
| | | | | | | First step towards implemening issue #7401. The same can be done for all deprecated mb_ functions in follow-up patches.
* vim-patch:8.0.0704: problems with autocommands when opening helpJan Edmund Lazo2018-06-25
| | | | | | | Problem: Problems with autocommands when opening help. Solution: Avoid using invalid "varp" value. Allow using :wincmd if buffer is locked. (closes vim/vim#1806, closes vim/vim#1804) https://github.com/vim/vim/commit/163095f088a7c29710a16c75bb56229dd3b4116a
* vim-patch:8.1.0107: getting buffer option clears message (#8637)Jacob Niehus2018-06-24
| | | | | | | | | | | | https://github.com/vim/vim/commit/defe6424aee6201241b7cb231b62db4bbb9f4a9f Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 24 15:14:07 2018 +0200 patch 8.1.0107: Python: getting buffer option clears message Problem: Python: getting buffer option clears message. (Jacob Niehus) Solution: Don't use aucmd_prepbuf(). (closes #3079)
* vim-patch:8.0.0616: not always setting 'background' correctly after :hi ↵Jan Edmund Lazo2018-06-21
| | | | | | | | | | | | | | Normal (#8606) Problem: When setting the cterm background with ":hi Normal" the value of 'background' may be set wrongly. Solution: Check that the color is less than 16. Don't set 'background' when it was set explicitly. (Lemonboy, closes vim/vim#1710) https://github.com/vim/vim/commit/1615b36b91b094263240d7b555283ddf33208f62 Restore reset_option_was_set(), removed in 419da839e0cbdf6251bc31dc218fa629ccc91b44 ref #8595 ref #8597
* vim-patch:8.0.0546: swap file exists briefly when opening the command window ↵Jan Edmund Lazo2018-06-19
| | | | | | | | (#8588) Problem: Swap file exists briefly when opening the command window. Solution: Set the noswapfile command modifier before splitting the window. (James McCoy, closes vim/vim#1620) https://github.com/vim/vim/commit/3bab93998d01a01b7f2a071fa3b8054bb0094625
* Merge #8526 from janlazo/vim-8.0.0451Justin M. Keyes2018-06-16
|\
| * vim-patch:8.0.0451: some macros are in lower caseJan Edmund Lazo2018-06-12
| | | | | | | | | | | | | | Problem: Some macros are in lower case. Solution: Make a few more macros upper case. Avoid lower case macros use an argument twice. https://github.com/vim/vim/commit/91acfffc1e6c0d8c2abfb186a0e79a5bf19c3f3f
* | fillchars: make checks more strict and improve testsBjörn Linse2018-06-14
| |
* | Add ‘eob’ option to fillcharsJack Bracewell2018-06-13
| | | | | | | | | | This option allows configuring what character is shown on the empty lines at the end of a buffer, previously hardcoded to ‘~’
* | options: remove 'maxcombine` option (always use 6)Björn Linse2018-06-13
|/
* vim-patch:8.0.0466: still macros that should be all-caps (#8510)Jan Edmund Lazo2018-06-10
| | | | | Problem: There are still a few macros that should be all-caps. Solution: Make a few more macros all-caps. https://github.com/vim/vim/commit/8820b48654b62472821d9b155fe03ab7ac13a05c
* vim-patch:8.0.1237: ":set scroll&" often gives an error (#8473)Jan Edmund Lazo2018-06-04
| | | | | | | Problem: ":set scroll&" often gives an error. Solution: Don't use a fixed default value, use half the window height. Add a test. (Ozaki Kiichi, closes vim/vim#2104) https://github.com/vim/vim/commit/af2d20c6285c1d2973e3d9b5e8f727e3ed180493
* vim-patch:8.0.0342: double free with EXITFREE and setting 'ttytype'Justin M. Keyes2018-05-19
| | | | | | | Problem: Double free when compiled with EXITFREE and setting 'ttytype'. Solution: Avoid setting P_ALLOCED on 'ttytype'. (Dominique Pelle, closes vim/vim#1461) https://github.com/vim/vim/commit/673911457d6745b6b779eb769c2f41965592d12c
* cleanupJustin M. Keyes2018-05-18
|