aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| * docs: misc (#28837)dundargoc2024-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Danymat <d.danymat@gmail.com> Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Jakub Okoński <jakub@okonski.org> Co-authored-by: John L. Villalovos <john@sodarock.com> Co-authored-by: Maria José Solano <majosolano99@gmail.com> Co-authored-by: Michaili K <git@michaili.dev> Co-authored-by: TheLeoP <eugenio2305@hotmail.com> Co-authored-by: Tobias Schmitz <tobiasschmitz2001@gmail.com> Co-authored-by: W20MC <157727813+W20MC@users.noreply.github.com> Co-authored-by: Will Hopkins <willothyh@gmail.com> Co-authored-by: Yifan Hu <141280278+b0ae989c@users.noreply.github.com> Co-authored-by: glepnir <glephunter@gmail.com> Co-authored-by: prljav <74116121+prljav@users.noreply.github.com>
| * fix(fileio): copy to correct buffer position when readingbfredl2024-06-06
| | | | | | | | | | | | fixes #29186 (likely) fixup for #29093 064483a2b
| * vim-patch:9.1.0469: Cannot have buffer-local value for 'completeopt'zeertzjq2024-06-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot have buffer-local value for 'completeopt' (Nick Jensen). Solution: Make 'completeopt' global-local (zeertzjq). Also for some reason test Test_ColonEight_MultiByte seems to be failing sporadically now. Let's mark it as flaky. fixes: vim/vim#5487 closes: vim/vim#14922 https://github.com/vim/vim/commit/529b9ad62a0e843ee56ef609aef7e51b7dc8a4c8
| * vim-patch:9.1.0467: typos in some commentszeertzjq2024-06-06
| | | | | | | | | | | | | | | | | | | | | | Problem: typos in some comments (after v9.1.0466) Solution: fix comments (zeertzjq) closes: vim/vim#14919 https://github.com/vim/vim/commit/551d8c372e49ed630fd95c6422a0ee62d00902c5
| * fix(tui): move $COLORTERM check to _defaults.lua (#29197)Gregory Anders2024-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently check $COLORTERM in the TUI process to determine if the terminal supports 24 bit color (truecolor). If $COLORTERM is "truecolor" or "24bit" then we automatically assume that the terminal supports truecolor, but if $COLORTERM is set to any other value we still query the terminal. The `rgb` flag of the UI struct is a boolean which only indicates whether the UI supports truecolor, but does not have a 3rd state that we can use to represent "we don't know if the UI supports truecolor". We currently use `rgb=false` to represent this "we don't know" state, and we use XTGETTCAP and DECRQSS queries to determine at runtime if the terminal supports truecolor. However, if $COLORTERM is set to a value besides "truecolor" or "24bit" (e.g. "256" or "16) that is a clear indication that the terminal _does not_ support truecolor, so it is incorrect to treat `rgb=false` as "we don't know" in that case. Instead, in the TUI process we only check for the terminfo capabilities. This must be done in the TUI process because we do not have access to this information in the core Neovim process when `_defaults.lua` runs. If the TUI cannot determine truecolor support from terminfo alone, we set `rgb=false` to indicate "we don't know if the terminal supports truecolor yet, keep checking". When we get to `_defaults.lua`, we can then check $COLORTERM and only query the terminal if it is unset. This means that users can explicitly opt out of truecolor determination by setting `COLORTERM=256` (or similar) in their environment.
| * vim-patch:9.1.0466: Missing comments for fuzzy completionzeertzjq2024-06-05
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Missing comments for fuzzy completion (after 9.1.0463) Solution: Add more comments, adjust indentation slightly (glepnir) closes: vim/vim#14910 https://github.com/vim/vim/commit/dca57fb54200530a0874c90fab799a689c00c597 Co-authored-by: glepnir <glephunter@gmail.com>
| * vim-patch:2a2c4ff: runtime(doc): clarify how fuzzy 'completeopt' should workzeertzjq2024-06-05
| | | | | | | | | | | | | | | | related: vim/vim#14912 https://github.com/vim/vim/commit/2a2c4fffd7e04f74b316209404767f128684a9e1 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * vim-patch:9.1.0463: no fuzzy-matching support for insert-completionzeertzjq2024-06-05
| | | | | | | | | | | | | | | | | | | | | | | | Problem: no fuzzy-matching support for insert-completion Solution: enable insert-mode completion with fuzzy-matching using :set completopt+=fuzzy (glepnir). closes: vim/vim#14878 https://github.com/vim/vim/commit/a218cc6cdabae1113647b817c4eefc2b60a6902f Co-authored-by: glepnir <glephunter@gmail.com>
| * fix(ui): superfluous showmode / excessive grid_cursor_goto #29089luukvbaal2024-06-04
| | | | | | | | | | | | | | | | | | Problem: Unsetting global variables earlier in #28578 to avoid recursiveness, caused superfluous or even unlimited showmode(). Solution: Partly revert #28578 so that the globals are unset at the end of showmode(), and avoid recursiveness for ext UI by adding a recursive function guard to each generated UI call that may call a Lua callback.
| * refactor(lua): use tuple syntax everywhere #29111Ilia Choly2024-06-04
| |
| * refactor(spell.c): reduce scope of localsLewis Russell2024-06-04
| |
| * fixup: include nvim/ascii_defs.hJames Tirta Halim2024-06-04
| |
| * fixup: apply the change on more filesJames Tirta Halim2024-06-04
| |
| * fixup: LNULJames Tirta Halim2024-06-04
| |
| * refactor: replace '\0' with NULJames Tirta Halim2024-06-04
| |
| * vim-patch:9.1.0464: no whitespace padding in commentstring option in ftpluginsChristian Clason2024-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: no whitespace padding in commentstring option in ftplugins Solution: Change default to include whitespace padding, update existing filetype plugins with the new default value (Riley Bruins) closes: vim/vim#14843 https://github.com/vim/vim/commit/0a0830624a260660c7fa692ecb7e6e5de09114ba Co-authored-by: Riley Bruins <ribru17@hotmail.com>
| * 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
* | | Merge remote-tracking branch 'upstream/master' into mix_20240309Josh Rahm2024-05-24
|\| |
| * | 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>