aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* vim-patch:partial:9.1.0461: too many strlen() calls in drawline.c (#29150)zeertzjq2024-06-03
| | | | | | | | | | | Problem: too many strlen() calls in drawline.c Solution: Refactor code to avoid strlen() (John Marriott) closes: vim/vim#14890 https://github.com/vim/vim/commit/f51ff96532ab8f97f779b44d17dccdda9d8ce566 Co-authored-by: John Marriott <basilisk@internode.on.net>
* vim-patch:9.1.0458: Coverity complains about division by zero (#29149)zeertzjq2024-06-03
| | | | | | | | | | | Problem: Coverity complains about division by zero Solution: Check explicitly for sw_val being zero Shouldn't happen, since tabstop value should always be larger than zero. So just add this as a safety measure. https://github.com/vim/vim/commit/7737ce519b9cba8ef135154d76b69f715b1a0b4d Co-authored-by: Christian Brabandt <cb@256bit.org>
* Merge pull request #29124 from bfredl/inputringbfredl2024-06-02
|\ | | | | refactor(input): don't use a ring for input
| * refactor(input): don't use a ring for inputbfredl2024-06-01
| | | | | | | | Since paste data is handled via a separate channel, the data processed via `input_buffer` is typically just explicit keys as typed in by the user. Therefore it should be fine to use `memmove()` to always put the remaining data in front when refilling the buffer.
* | vim-patch:8.2.0109: corrupted text properties when expanding spaceszeertzjq2024-06-02
| | | | | | | | | | | | | | | | | | Problem: Corrupted text properties when expanding spaces. Solution: Reallocate the line. (Nobuhiro Takasaki, closes vim/vim#5457) https://github.com/vim/vim/commit/ac15fd8c6761763c8feedef1a2fbd8309f0a823c Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | vim-patch:8.2.0083: text properties wrong when tabs and spaces are exchangedzeertzjq2024-06-02
| | | | | | | | | | | | | | | | | | | | Problem: Text properties wrong when tabs and spaces are exchanged. Solution: Take text properties into account. (Nobuhiro Takasaki, closes vim/vim#5427) https://github.com/vim/vim/commit/5cb0b93d52fa5c12ca50a18509947ee6459bb7a8 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | vim-patch:9.1.0456: Left shift is incorrect with vartabstop and shiftwidth=0zeertzjq2024-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Left shift is incorrect with vartabstop and shiftwidth=0 Solution: make tabstop_at() function aware of shift direction (Gary Johnson) The problem was that with 'vartabstop' set and 'shiftwidth' equal 0, left shifts using << were shifting the line to the wrong column. The tabstop to the right of the first character in the line was being used as the shift amount instead of the tabstop to the left of that first character. The reason was that the tabstop_at() function always returned the value of the tabstop to the right of the given column and was not accounting for the direction of the shift. The solution was to make tabstop_at() aware of the direction of the shift and to choose the tabtop accordingly. A test was added to check this behavior and make sure it doesn't regress. While at it, also fix a few indentation/alignment issues. fixes: vim/vim#14864 closes: vim/vim#14887 https://github.com/vim/vim/commit/88d4f255b7b7a19bb4f6489e0ad0956e47d51fed Co-authored-by: Gary Johnson <garyjohn@spocom.com>
* | vim-patch:e299591: runtime(doc): clarify 'shortmess' flag "S" (#29131)zeertzjq2024-06-02
| | | | | | | | | | | | | | fixes: vim/vim#14893 https://github.com/vim/vim/commit/e299591498a20c5c587364e4df57f947dfc02897 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | refactor: move shared messages to errors.h #26214Justin M. Keyes2024-06-01
| |
* | fix(column): crash with 'signcolumn' set to "number" (#29003)luukvbaal2024-06-01
|/ | | | | | Problem: Numberwidth may depend on number of signs with text in the buffer and is not handled correctly for extmark signs. Solution: Move legacy sign code for changed numberwidth so that it is handled properly for legacy and extmark signs alike.
* refactor(tui): use a linear buffer for buffered keysbfredl2024-06-01
| | | | | This buffer is completely emptied every time it is read from. Thus there is no point in using a ring buffer.
* refactor(io): separate types for read and write streamsbfredl2024-05-31
| | | | | | | | | | | | This is a structural refactor with no logical changes, yet. Done in preparation for simplifying rstream/rbuffer which will require more state inline in RStream. The initial idea was to have RStream and WStream as sub-types symetrically but that doesn't work, as sockets are both reading and writing. Also there is very little write-specific state to start with, so the benefit of a separate WStream struct is a lot smaller. Just document what fields in `Stream` are write specific.
* Merge pull request #29093 from bfredl/noringbfredl2024-05-31
|\ | | | | refactor(fileio): use a linear buffer for FileDescriptor
| * refactor(fileio): use a linear buffer for FileDescriptorbfredl2024-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using a ring buffer for buffered synchronous fileio is just unnecessary complexity. - when reading, we always consume the _entire_ buffer before getting into syscalls. Thus we reset the buffer to its initial position before when we actually read. - when writing and buffer is full, we always flush the entire buffer before starting to buffer again. So we can reset the buffer to its initial state. Also no static buffers are needed for writing and skipping. Needing an extra copy for each write completely defeated the purpose of a ring buffer (if there had been one)
* | vim-patch:9.1.0451: No test for escaping '<' with shellescape()zeertzjq2024-05-31
| | | | | | | | | | | | | | | | | | | | Problem: No test for escaping '<' with shellescape() Solution: Add a test. Use memcpy() in code to make it easier to understand. Fix a typo (zeertzjq). closes: vim/vim#14876 https://github.com/vim/vim/commit/88c8c547d5fc380e5685c2b01ec564ccdf9b259a
* | vim-patch:9.1.0449: MS-Windows: Compiler warningszeertzjq2024-05-31
|/ | | | | | | | | | | | | | | | Problem: MS-Windows: Compiler warnings Solution: Resolve size_t to int warnings closes: vim/vim#14874 A couple of warnings in ex_docmd.c have been resolved by modifying their function argument types, followed by some changes in various function call sites. This also allowed removal of some casts to cope with size_t/int conversion. https://github.com/vim/vim/commit/51024bbc1a9e298b1fb8f2e465fccb5db409551e Co-authored-by: Mike Williams <mrmrdubya@gmail.com>
* Merge pull request #29016 from bfredl/shadareaderbfredl2024-05-29
|\ | | | | refactor(shada): remove ShaDaReadDef secondary wrapper
| * refactor(shada): remove ShaDaReadDef secondary wrapperbfredl2024-05-28
| | | | | | | | | | | | `FileDescriptor` is already a wrapper around an fd and a buffer. By allowing to just use the buffer without an fd, it can already handle in-memory reads.
* | refactor(fileio): remove useless use of FileDescriptorbfredl2024-05-28
| | | | | | | | | | | | | | FileDescriptor is used to buffer togheter many small writes to fewer syscalls. if the data to write already is in a single buffer, it is perfectly fine to just use os_write directly (which will take care of the reverse problem: splitting a too big write into many syscalls)
* | fix(ui): flush ext_cmdline events before doing cmdpreview #27950luukvbaal2024-05-28
|/ | | | Problem: Unable to update the screen for external cmdline during cmdpreview. Solution: Flush the cmdline UI before cmdpreview state.
* refactor: fix luals type warningsdundargoc2024-05-27
|
* vim-patch:9.1.0447: completion may be wrong when deleting all chars (#29040)glepnir2024-05-27
| | | | | | | | Problem: completion may be wrong when deleting all chars. Solution: reset compl_shown_match (glepnir). closes: https://github.com/vim/vim/pull/14854 https://github.com/vim/vim/commit/53387c55a13bc1013a6ab721d4bd0bd04c6935c4
* build: "popcount" name conflict on NetBSD #28983Malte Dehling2024-05-27
| | | | | | | | Problem: NetBSD's libc already has a function by the same name. Solution: Rename popcount to xpopcount and add #if defined(__NetBSD__) to prefer NetBSD's own implementation. This fixes #28983.
* fix(drawline): don't draw beyond end of window (#29035)zeertzjq2024-05-27
|
* vim-patch:9.1.0446: getregionpos() inconsistent for partly-selected ↵zeertzjq2024-05-27
| | | | | | | | | | | | multibyte char (#29032) Problem: getregionpos() behaves inconsistently for a partly-selected multibyte char. Solution: Always use column of the first byte for a partly-selected multibyte char (zeertzjq). closes: vim/vim#14851 https://github.com/vim/vim/commit/ef73374dc3e4bf8104ba31d5b22517f8028b467a
* fix(extmarks): issues with revalidating marks #28961luukvbaal2024-05-26
| | | | | | Problem: Invalid marks appear to be revalidated multiple times, and decor is added at the old position for unpaired marks. Solution: Avoid revalidating already valid marks, and don't use old position to add to decor for unpaired marks.
* fix(tui): reset clear_region attributes during startup #28713luukvbaal2024-05-26
| | | | | | Problem: Fix added in #28676 worked accidentally(used variables were themselves uninitialized at this point during startup) and does not always work. Solution: Reset attributes when clearing regions during startup.
* feat(main): expand file ~\ or ~/ prefix on Windows (#28515)Rafael Kitover2024-05-25
| | | | | | | | In command_line_scan() for MSWIN, expand "~\" or "~/" prefixed paths to the USERPROFILE environment variable for the user's profile directory. Fix #23901 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
* Merge pull request #28617 from glepnir/border_hlbfredl2024-05-25
|\ | | | | fix(float): missing default highlight for title
| * fix(float): missing default highlight for titleglepnir2024-05-25
| | | | | | | | | | | | Problem: there is missing default title highlight when highlight not defined in title text chunk. Solution: when attr is not set use default title highlight group.
* | vim-patch:9.1.0444: Not enough tests for getregion() with multibyte chars ↵zeertzjq2024-05-25
| | | | | | | | | | | | | | | | | | | | (#29000) Problem: Not enough tests for getregion() with multibyte chars. Solution: Add a few more tests (zeertzjq). closes: vim/vim#14844 https://github.com/vim/vim/commit/dff55a335889c746a79974f7c52cdcdebad682c2
* | vim-patch:9.1.0443: Can't use blockwise selection with width for getregion() ↵zeertzjq2024-05-25
| | | | | | | | | | | | | | | | | | | | | | | | (#28985) Problem: Can't use a blockwise selection with a width for getregion(). Solution: Add support for blockwise selection with width like the return value of getregtype() or the "regtype" value of TextYankPost (zeertzjq). closes: vim/vim#14842 https://github.com/vim/vim/commit/afc2295c2201ae87bfbb42d5f5315ad0583ccabf
* | vim-patch:9.1.0440: function get_lval() is too long (#28963)zeertzjq2024-05-24
| | | | | | | | | | | | | | | | | | | | | | Problem: function get_lval() is too long Solution: factor out the get_lval_subscript() function (Yegappan Lakshmanan) closes: vim/vim#14839 https://github.com/vim/vim/commit/44cadaa18c1816f7a576f1870790ee01a23c1071 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* | vim-patch:8.2.3158: strange error message when using islocked() with a ↵zeertzjq2024-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | number (#28962) Problem: Strange error message when using islocked() with a number. (Yegappan Lakshmanan) Solution: Check that the name is empty. https://github.com/vim/vim/commit/1840a7b4e3577e617f724c9d07ccc78195cc010a Use ll_name_len instead. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | feat(complete): specify reason for CompleteDoneFamiu Haque2024-05-24
| | | | | | | | | | Problem: `CompleteDone` currently does not specify the reason for why completion was done, which is problematic for completion plugins as they cannot know whether the event was triggered due to the completion being canceled, accepted, or for some other reason. Solution: Add a `reason` key to `v:event`, which is set by `CompleteDone` to indicate why completion ended.
* | vim-patch:9.1.0439: Cannot filter the history (#28958)zeertzjq2024-05-24
| | | | | | | | | | | | | | | | | | | | Problem: Cannot filter the history Solution: Implement :filter :history closes: vim/vim#14835 https://github.com/vim/vim/commit/42a5b5a6d0d05255b9c464abe71f29c7677b5833 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.1.0441: getregionpos() can't properly indicate positions beyond ↵zeertzjq2024-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eol (#28957) Problem: getregionpos() can't properly indicate positions beyond eol. Solution: Add an "eol" flag that enables handling positions beyond end of line like getpos() does (zeertzjq). Also fix the problem that a position still has the coladd beyond the end of the line when its column has been clamped. In the last test case with TABs at the end of the line the old behavior is obviously wrong. I decided to gate this behind a flag because returning positions that don't correspond to actual characters in the line may lead to mistakes for callers that want to calculate the length of the selected text, so the behavior is only enabled if the caller wants it. closes: vim/vim#14838 https://github.com/vim/vim/commit/2b09de910458247b70751928217422c38fd5abf8
* | vim-patch:9.1.0438: Wrong Ex command executed when :g uses '?' as delimiter ↵zeertzjq2024-05-24
| | | | | | | | | | | | | | | | | | | | | | (#28956) Problem: Wrong Ex command executed when :g uses '?' as delimiter and pattern contains escaped '?'. Solution: Don't use "*newp" when it's not allocated (zeertzjq). closes: vim/vim#14837 https://github.com/vim/vim/commit/3074137542961ce7b3b65c14ebde75f13f5e6147
* | vim-patch:9.1.0436: Crash when using '?' as separator for :s (#28955)zeertzjq2024-05-24
| | | | | | | | | | | | | | | | | | | | Problem: Crash when using '?' as separator for :s and pattern contains escaped '?'s (after 9.1.0409). Solution: Always compute startplen. (zeertzjq). related: neovim/neovim#28935 closes: 14832 https://github.com/vim/vim/commit/789679cfc4f39505b135220672b43a260d8ca3b4
* | fix(colorscheme): underline StatusLineNC with 'notermguicolors' #28810Evgeni Chasnovski2024-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: statusline for non-active window can be hard to distinguish from normal text with 'notermguicolors'. It was set to use only bold text to find a balance between being not too similar to active statusline and normal text, and be supported in enough terminal emulators (if it does not support 'termguicolors' there is higher chance that it also does not support underline). Solution: reconsider balance by placing more emphasis on making non-active statusline more distinguishable. This also results into tabline being shown with underline which aligns with "make more distinguishable" shift.
* | vim-patch:9.1.0433: Wrong yanking with exclusive selection and ve=all (#28933)zeertzjq2024-05-23
| | | | | | | | | | | | | | | | | | | | Problem: Wrong yanking with exclusive selection and virtualedit=all, and integer overflow when using getregion() on it. Solution: Set coladd when decreasing column and 'virtualedit' is active. Add more tests for getregion() with 'virtualedit' (zeertzjq). closes: vim/vim#14830 https://github.com/vim/vim/commit/701ad50a9efcf0adfe6d787b606c4e4dbd31f26d
* | fix(shada): restore search pattern length properly (#28929)zeertzjq2024-05-23
| |
* | vim-patch:9.0.1175: the set_ref_in_item() function is too long (#28926)zeertzjq2024-05-23
| | | | | | | | | | | | | | | | | | Problem: The set_ref_in_item() function is too long. Solution: Use a separate function for more complicated types. (Yegappan Lakshmanan, closes vim/vim#11802) https://github.com/vim/vim/commit/ea125393af01ecaf75cee8e085a57f8143f3ae3e Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* | vim-patch:8.2.0703: Vim9: closure cannot store value in outer context (#28925)zeertzjq2024-05-23
| | | | | | | | | | | | | | | | | | | | | | Problem: Vim9: closure cannot store value in outer context. Solution: Make storing value in outer context work. Make :disassemble accept a function reference. https://github.com/vim/vim/commit/b68b346e6db6d3f848e0a89905fcd7777b73c5d8 Funcstack is Vim9script-only. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | vim-patch:9.1.0430: getregionpos() doesn't handle one char selection (#28924)zeertzjq2024-05-23
| | | | | | | | | | | | | | | | | | | | Problem: getregionpos() doesn't handle one char selection. Solution: Handle startspaces differently when is_oneChar is set. Also add a test for an exclusive charwise selection with multibyte chars (zeertzjq) closes: vim/vim#14825 https://github.com/vim/vim/commit/52a6f348874778cf315b47d9e8b5f818f4b97277
* | vim-patch:9.1.0428: Tag guessing leaves wrong search history with very short ↵zeertzjq2024-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | names Problem: Tag guessing leaves wrong search history with very short names (after 9.1.0426). Solution: Use the correct variable for pattern length (zeertzjq). closes: vim/vim#14817 https://github.com/vim/vim/commit/42cd192daa4b7f29131c7be1beaecb6067e96266 Cherry-pick Test_tagbsearch() changes from patch 9.0.0767.
* | vim-patch:9.1.0426: too many strlen() calls in search.czeertzjq2024-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: too many strlen() calls in search.c Solution: refactor code and remove more strlen() calls, use explicit variable to remember strlen (John Marriott) closes: vim/vim#14796 https://github.com/vim/vim/commit/8c85a2a49acf80e4f53ec51e6ff2a5f3830eeddb Co-authored-by: John Marriott <basilisk@internode.on.net>
* | feat(signs)!: place higher-priority signs from the left #27781Tobias Schmitz2024-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Higher-priority signs may be hidden by lower-priority signs. Solution: Place higher-priority signs from the left. Example: nvim_buf_set_extmark(0, ns, 0, -1, {sign_text='H', priority=1}) nvim_buf_set_extmark(0, ns, 0, -1, {sign_text='W', priority=2}) nvim_buf_set_extmark(0, ns, 0, -1, {sign_text='E', priority=3}) Before: | | H | W E | ^ | | Not visible After: | | | E W | H | | ^ Not visible Fixes #16632
* | fix(tui): remove duplicate disabling of synchronized output (#28884)zeertzjq2024-05-21
| | | | | | Synchronized output is enabled and disabled inside flush_buf().
* | vim-patch:8.2.1520: Vim9: CTRL-] used in :def function does not work (#28880)zeertzjq2024-05-21
| | | | | | | | | | | | | | | | Problem: Vim9: CTRL-] used in :def function does not work. Solution: Omit count or prepend colon. (closes vim/vim#6769) https://github.com/vim/vim/commit/b3ea36c5bcb88b6a05a66347eedd461e9385103f Co-authored-by: Bram Moolenaar <Bram@vim.org>