aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
Commit message (Collapse)AuthorAge
...
* option: use char* for set_string_option_direct()Jan Edmund Lazo2021-02-07
| | | | | | | "name" param was cast to (const char *). All calls to set_string_option_direct() cast 1st arg from (char *) to (char_u *). Remove these useless casts.
* Merge pull request #13702 from erw7/fix-build_stl_str_hlerw72021-02-06
|\ | | | | buffer.c: fix problem of memory allocation
| * buffer.c: remove useless 'for' loops.erw72021-01-09
| |
| * buffer.c: fix problem of memory allocationerw72021-01-05
| |
* | Use abort() instead of assert(false) for things that should never happenJames McCoy2021-01-31
|/ | | | | | | | assert() is compiled out for release builds, but we don't want to continue running in these impossible situations. This also resolves the "implicit fallthrough" warnings for the asserts in switch cases.
* vim-patch:8.1.1667: flags for Ex commands may clash with other symbolsJan Edmund Lazo2021-01-02
| | | | | | | | | | | | | | | | | Problem: Flags for Ex commands may clash with other symbols. Solution: Prepend with EX_. https://github.com/vim/vim/commit/8071cb2c646c9d38dcd4e3ccd377dce07705f031 N/A patches for version.c: vim-patch:8.1.1672: "make cmdidxs" doesn't work Problem: "make cmdidxs" doesn't work. Solution: Update macro names. (Naruhiko Nishino, closes vim/vim#4660) https://github.com/vim/vim/commit/d94ac0caca12c6ceb54b07fc932edba84a5f60f2 Error message for src/nvim/ex_cmds.lua which omits the "EX_" prefix for the flags.
* vim-patch:8.2.2231: when "--remote file" is used "file" is not reloadedJan Edmund Lazo2020-12-27
| | | | | | | | | | | Problem: When "--remote file" is used "file" is not reloaded. Solution: When a :drop command is used for a file that is already displayed in a window and it has not been changed, check if it needs to be reloaded. (closes vim/vim#7560) https://github.com/vim/vim/commit/e4862a0fe62261754daf476866ef2aa8586b716c Remove unused "focus" parameter from "buf_check_timestamp()". It was meant for removed GUI code.
* feat(sign):Allow signs to be 0 width (#13290)Lukas Reineke2020-12-24
| | | | Adds support for signs to be 0 cells wide. If all signs of the same group have no width, the signcolumn will not be rendered for that group.
* vim-patch:8.2.0116: BufEnter autocmd not triggered on ":tab drop"Jan Edmund Lazo2020-12-23
| | | | | | | | | | | | | | | Problem: BufEnter autocmd not triggered on ":tab drop". (Andy Stewart) Solution: Decrement autocmd_no_enter for the last file. (closes vim/vim#1660, closes vim/vim#5473) https://github.com/vim/vim/commit/c10b521628f2b073fa231defa26f23937c91724d N/A patches for version.c: vim-patch:8.1.1805: au_did_filetype is declared twice Problem: Au_did_filetype is declared twice. Solution: Remove it from autocmd.c. (closes vim/vim#4767) https://github.com/vim/vim/commit/6cd57d44669c02af9195f5601b882edd435b47e8
* vim-patch:8.1.0470: pointer ownership around fname_expand() is unclearJan Edmund Lazo2020-12-19
| | | | | | | Problem: Pointer ownership around fname_expand() is unclear. Solution: Allow b_ffname and b_sfname to point to the same allocated memory, only free one. Update comments. https://github.com/vim/vim/commit/3d6014f0336d9a64c01a7518fe45fde0a925fa20
* vim-patch:8.0.1525: using :wqa exits even if a job runs in a terminal windowJan Edmund Lazo2020-12-01
| | | | | | | Problem: Using :wqa exits even if a job runs in a terminal window. (Jason Felice) Solution: Check if a terminal has a running job. (closes vim/vim#2654) https://github.com/vim/vim/commit/7a76092a51fc5446426a4bfd9eb6503ec61bf9e9
* vim-patch:8.0.0953: get "no write since last change" error in terminal windowJan Edmund Lazo2020-12-01
| | | | | | | Problem: Get "no write since last change" error in terminal window. Solution: Use another message when closing a terminal window. Make ":quit!" also end the job. https://github.com/vim/vim/commit/f5be7cd01642fafc4b7d68894eb60cca60c7a405
* refactor: pass window to was_set_insecurelyMatthieu Coudron2020-11-23
| | | | | | working on get_foldtext and wanted to get rid of the curwin backup/restore. Turns out it's not possible else f_foldtext is run on the same window. Kept the cleanup anyway.
* vim-patch:8.1.0805: too many #ifdefsJan Edmund Lazo2020-11-12
| | | | | | Problem: Too many #ifdefs. Solution: Graduate FEAT_MBYTE, part 1. https://github.com/vim/vim/commit/135059724f140ceac889c9f8136bd1bf5c41d49d
* vim-patch:8.2.1959: crash when terminal buffer name is made emptyJan Edmund Lazo2020-11-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Crash when terminal buffer name is made empty. (Dhiraj Mishra) Solution: Fall back to "[No Name]". (closes vim/vim#7262) https://github.com/vim/vim/commit/00806bceb6dc9c8dcd308e5f7e50f720f7dc71b0 N/A patches for version.c: vim-patch:8.1.2422: "make depend" does not work correctly for libvterm Problem: "make depend" does not work correctly for libvterm. Solution: Fix build dependencies. And a few minor improvements. https://github.com/vim/vim/commit/9810cfbe554b166cb05b51119040bb4426c17bac vim-patch:8.2.1962: netbeans may access freed memory Problem: Netbeans may access freed memory. Solution: Check the buffer pointer is still valid. Add a test. (Yegappan Lakshmanan, closes vim/vim#7248) https://github.com/vim/vim/commit/32e5ec0b017adb68fe36adb9a9a362abdaffe7f4 vim-patch:8.2.1963: crash when using a popup window with "latin1" encoding Problem: Crash when using a popup window with "latin1" encoding. Solution: Don't use ScreenLinesUC when enc_utf8 is false. (closes vim/vim#7241) https://github.com/vim/vim/commit/927495b1fef835a8f83c089bb3aa3608b617e972
* vim-patch:8.1.0268: file type checking has too many #ifdef (#13182)tamago3242020-11-06
| | | | | Problem: File type checking has too many #ifdef. Solution: Always define the S_IF macros. (Ken Takata, closes vim/vim#3306) https://github.com/vim/vim/commit/d569bb029983cff947dce704e6f830276204c13f
* Merge pull request #12870 from bfredl/themeparkBjörn Linse2020-11-01
|\ | | | | Color themes (per window/line) and lua theme providers
| * api: add API for themesBjörn Linse2020-11-01
| | | | | | | | | | | | | | | | | | | | co-author: hlpr98 <hlpr98@gmail.com> (dict2hlattrs function) orange is sus?? NOVEMBER DAWN erase the lie that is redraw_later()
* | vim-patch:8.2.1909: number of status line items is limited to 80Rom Grk2020-10-31
|/ | | | | | | | | | Problem: Number of status line items is limited to 80. Solution: Dynamically allocate the arrays. (Rom Grk, closes vim/vim#7181) https://github.com/vim/vim/commit/8133cc6bf454eb90bb0868f7cf806fce5c0c9fe6 The members of stl_item_T have not been prefixed with stl_ contrary to the vim patch because the amount of stl_ prefixes on single lines of code in that region was hurtful to readability.
* Revert "vim-patch:8.1.0877: new buffer used every time the quickfix window ↵Jan Edmund Lazo2020-10-20
| | | | | | | | is opened" This reverts commit e82b8ddef16eb7ce96e1d3d063ff529f79ed6bb2. Fix https://github.com/neovim/neovim/issues/13104
* vim-patch:8.1.0877: new buffer used every time the quickfix window is openedJan Edmund Lazo2020-10-10
| | | | | | Problem: New buffer used every time the quickfix window is opened. Solution: Reuse the buffer. (Yegappan Lakshmanan, closes vim/vim#3902) https://github.com/vim/vim/commit/ee8188fc74a7cf9ee7acb634b2bb7a032d0cb24c
* folds: pass column on fold creationMatthieu Coudron2020-09-28
| | | | | useful if we want to have inline folds later and/or let users create folds that remember their start/end columns.
* vim-patch:8.2.0953: spell checking doesn't work for CamelCased wordsThomas Vigouroux2020-09-24
| | | | | | | Problem: Spell checking doesn't work for CamelCased words. Solution: Add the "camel" value in the new option 'spelloptions'. (closes vim/vim#1235) https://github.com/vim/vim/commit/362b44bd4aa87a2aef0f8fd5a28d68dd09a7d909
* vim-patch:8.1.2267: compiler warning for uninitialized variableJan Edmund Lazo2020-08-18
| | | | | | Problem: Compiler warning for uninitialized variable. (Tony Mechelynck) Solution: Rearrange the code. https://github.com/vim/vim/commit/3b991527e8167f25ad1dfe780b9633c153600955
* vim-patch:8.2.1259: empty group in 'tabline' may cause using an invalid pointerJan Edmund Lazo2020-08-02
| | | | | | Problem: Empty group in 'tabline' may cause using an invalid pointer. Solution: Set the group start position. (closes vim/vim#6505) https://github.com/vim/vim/commit/f56c95fdad5af521887f8cd7bc15729b5355231d
* vim-patch:8.1.1372: when evaluating 'statusline' the current window is unknownJan Edmund Lazo2020-07-04
| | | | | | | | Problem: When evaluating 'statusline' the current window is unknown. (Daniel Hahler) Solution: Set "g:actual_curwin" for %{} items. Set "g:statusline_winid" when evaluationg %!. (closes vim/vim#4406, closes vim/vim#3299) https://github.com/vim/vim/commit/1c6fd1e100fd0457375642ec50d483bcc0f61bb2
* vim-patch:8.2.0966: 'shortmess' flag "n" not used in two placesJan Edmund Lazo2020-06-18
| | | | | | | Problem: 'shortmess' flag "n" not used in two places. Solution: Make use of the "n" flag consistent. (Nick Jensen, closes vim/vim#6245, closes vim/vim#6244) https://github.com/vim/vim/commit/722e505d1a55dfde5ab62241d10da91d2e10c3c1
* vim-patch:8.1.1895: using NULL pointer when out of memoryJan Edmund Lazo2020-06-04
| | | | | | | Problem: Using NULL pointer when out of memory. Solution: Bail out or skip the code using the pointer. (Zu-Ming Jiang, closes vim/vim#4805, closes vim/vim#4843, closes vim/vim#4939, closes vim/vim#4844) https://github.com/vim/vim/commit/6f10c70b59fa4e56aa479345fb0caeaac7429bfb
* vim-patch:8.1.2225: the "last used" info of a buffer is under usedRob Pilling2020-04-21
| | | | | | | Problem: The "last used" info of a buffer is under used. Solution: Add "lastused" to getbufinfo(). List buffers sorted by last-used field. (Andi Massimino, closes vim/vim#4722) https://github.com/vim/vim/commit/52410575be50d5c40bbe6380159df48cfc382ceb
* vim-patch:8.0.1651: cannot filter :ls output for terminal buffersRob Pilling2020-04-19
| | | | | | Problem: Cannot filter :ls output for terminal buffers. Solution: Add flags for terminal buffers. (Marcin Szamotulski, closes vim/vim#2751) https://github.com/vim/vim/commit/0751f51a5b428805a8c1e9fe529693d032bec991
* vim-patch:7.4.1988Rob Pilling2020-04-19
| | | | | | | | | | | Problem: When updating viminfo with file marks there is no time order. Solution: Remember the time when a buffer was last used, store marks for the most recently used buffers. https://github.com/vim/vim/commit/ab9c89b68dcbdb3fbda8c5a50dd90caca64f1bfd As this is a viminfo fix, most of this is irrelevant - the patch has just been brought across for the creation and updating of buffer's `b_last_used` properties.
* vim-patch:8.2.0464: typos and other small problemsJan Edmund Lazo2020-04-13
| | | | | | Problem: Typos and other small problems. Solution: Fix the typos. Add missing file to distribution. https://github.com/vim/vim/commit/2d9d409ad4fab1ae7ceaecc0ef0e9b511d868374
* vim-patch:8.1.0786: ml_get error when updating the status lineJan Edmund Lazo2020-02-16
| | | | | | | | Problem: ml_get error when updating the status line and a terminal had its scrollback cleared. (Chris Patuzzo) Solution: Check the cursor position when drawing the status line. (closes vim/vim#3830) https://github.com/vim/vim/commit/10772307c4e5299ed45470f92779f089a00d841e
* vim-patch:8.1.0069: cannot handle pressing CTRL-C in a prompt buffererw72020-02-12
| | | | | | Problem: Cannot handle pressing CTRL-C in a prompt buffer. Solution: Add prompt_setinterrupt(). https://github.com/vim/vim/commit/0e5979a6d491f68c4a8c86fab489016919329a6b
* vim-patch:8.1.0036: not restoring Insert mode if leaving prompt buffer with ↵erw72020-02-12
| | | | | | | | | | mouse Problem: Not restoring Insert mode if leaving a prompt buffer by using a mouse click. Solution: Set b_prompt_insert appropriately. Also correct cursor position when moving cursor to last line. https://github.com/vim/vim/commit/891e1fd894720d0b99a9daefa41e8181844f819a
* vim-patch:8.1.0027: difficult to make a plugin that feeds a line to a joberw72020-02-12
| | | | | | Problem: Difficult to make a plugin that feeds a line to a job. Solution: Add the nitial code for the "prompt" buftype. https://github.com/vim/vim/commit/f273245f6433d5d43a5671306b520a3230c35787
* vim-patch:8.2.0235: draw error when an empty group is removed from 'statusline'Björn Linse2020-02-09
| | | | | | Problem: Draw error when an empty group is removed from 'statusline'. Solution: Do not use highlighting from a removed group. https://github.com/vim/vim/commit/dbe5d361feb65137099644329cf0ecfd4a945a14
* vim-patch:8.1.0061: fix resetting, setting 'title' #11733Billy SU2020-01-21
| | | | | Problem: Window title is wrong after resetting and setting 'title'. Solution: Move resetting the title into maketitle(). (Jason Franklin) https://github.com/vim/vim/commit/84a9308511871d9ff94c91a1c6badb92300ded98
* shed biking: it's always extmarks, never marks extendedBjörn Linse2020-01-20
|
* extmarks/bufhl: reimplement using new marktree data structureBjörn Linse2020-01-16
| | | | | | | | | | | | | | | | | | | | Add new "splice" interface for tracking buffer changes at the byte level. This will later be reused for byte-resolution buffer updates. (Implementation has been started, but using undocumented "_on_bytes" option now as interface hasn't been finalized). Use this interface to improve many edge cases of extmark adjustment. Changed tests indicate previously incorrect behavior. Adding tests for more edge cases will be follow-up work (overlaps on_bytes tests) Don't consider creation/deletion of marks an undoable event by itself. This behavior was never documented, and imposes complexity for little gain. Add nvim__buf_add_decoration temporary API for direct access to the new implementation. This should be refactored into a proper API for decorations, probably involving a huge dict. fixes #11598
* vim-patch:8.1.2363: ml_get error when accessing Visual area in 'statusline'Jan Edmund Lazo2019-11-30
| | | | | | Problem: ml_get error when accessing Visual area in 'statusline'. Solution: Disable Visual mode when using another window. (closes vim/vim#5278) https://github.com/vim/vim/commit/dee50a518007b3a59f54b8ad018b6a83993593e7
* Improve terminal close error message formatting (#11434)Ashkan Kiani2019-11-24
|\
| * Fix terminal close error message formattingChuck2019-11-21
| |
* | vim-patch:8.1.0461: quickfix: change comment style #11453Jan Edmund Lazo2019-11-24
| | | | | | | | | | Problem: Quickfix code uses too many /* */ comments. Solution: Change to // comments. (Yegappan Lakshmanan) https://github.com/vim/vim/commit/00bf8cd2115be7c14258aee48c0a7568147c9cd7
* | vim-patch:8.1.1334: respect shortmess=F when buffer is hidden #11443Jan Edmund Lazo2019-11-23
| | | | | | | | | | | | | | | | | | | | Problem: When buffer is hidden "F" in 'shortmess' is not used. Solution: Check the "F" flag in 'shortmess' when the buffer is already loaded. (Jason Franklin) Add test_getvalue() to be able to test this. https://github.com/vim/vim/commit/eda652215abf696f86b872888945a2d2dd8c7192 test_getvalue() is not implemented. It is only used for checking "need_fileinfo" internal variable.
* | bufhl: use extmark column adjustment for bufhlBjörn Linse2019-11-23
|/ | | | | | | | NB: this is not the final implementation. Bufhl should be made a part of the extmark tree, so that "start" adjustment just works automatically. But "stop" will still need some ad-hoc trickery, until extended marks natively support ranges (hopefully sooner than forever).
* nsmarks: initial committimeyyy2019-11-11
|
* vim-patch:8.1.1228: not possible to process tags with a functionRob Pilling2019-10-22
| | | | | | Problem: Not possible to process tags with a function. Solution: Add tagfunc() (Christian Brabandt, Andy Massimino, closes vim/vim#4010) https://github.com/vim/vim/commit/45e18cbdc40afd8144d20dcc07ad2d981636f4c9
* vim-patch:8.1.1371: cannot recover from a swap file #11081Jurica Bradarić2019-10-05
| | | | | | | Problem: Cannot recover from a swap file. Solution: Do not expand environment variables in the swap file name. Do not check the extension when we already know a file is a swap file. (Ken Takata, closes 4415, closes vim/vim#4369) https://github.com/vim/vim/commit/99499b1c05f85f83876b828eea3f6e14f0f407b4
* vim-patch:8.1.0230: directly checking 'buftype' valueJan Edmund Lazo2019-10-01
| | | | | | Problem: Directly checking 'buftype' value. Solution: Add the bt_normal() function. (Yegappan Lakshmanan) https://github.com/vim/vim/commit/91335e5a67aaa9937e65f1e779b9f3f10fd33ee4