Commit Graph

21017 Commits

Author SHA1 Message Date
James McCoy
66fff788f2
Merge pull request #17857 from muniter/jl-breaking-change-label
ci: automatic breaking change label
2022-03-26 09:45:54 -04:00
かわえもん
85821d8b6f
docs(api): fix wrong documentation of nvim_create_autocmd (#17870)
also add doc changes from typofix PR
2022-03-26 13:21:32 +01:00
Javier López
ca7d633eaf ci: automatic breaking change label
When the PR title contains the breaking change format apply the
breaking-change label.
2022-03-26 07:18:00 -05:00
Dundar Göc
82304038a2 vim-patch:8.2.3943: compiler warning from gcc for uninitialized variable
Problem:    Compiler warning from gcc for uninitialized variable.
Solution:   Initialize variable. (closes vim/vim#9429)
491669701c
2022-03-26 12:12:03 +01:00
zeertzjq
fb5587d2be
Merge pull request #17839 from zeertzjq/vim-8.2.4281
vim-patch:8.2.{4281,4327}: fix two crashes with quickfix and wiping buffer
2022-03-26 12:59:34 +08:00
zeertzjq
a70b39965b
fix(tui): avoid using uninitialized memory in kitty (#17866) 2022-03-26 10:48:31 +08:00
zeertzjq
d8b4f3e3b8 vim-patch:8.2.4327: may end up with no current buffer
Problem:    May end up with no current buffer.
Solution:   When deleting the current buffer to not pick a quickfix buffer as
            the new current buffer.
e3537aec2f

The test cannot be ported as-is because Nvim doesn't support "-Z"
command line argument. Just use only "--clean" instead.
2022-03-26 09:51:59 +08:00
zeertzjq
19bbc43947 vim-patch:8.2.4281: using freed memory with :lopen and :bwipe
Problem:    Using freed memory with :lopen and :bwipe.
Solution:   Do not use a wiped out buffer.
9b4a80a665

Cherry-pick some indent changes from patch 8.2.1432.
2022-03-26 09:02:42 +08:00
zeertzjq
9530c2d6d8
vim-patch:8.2.4626: Visual area not updated when removing sign in Visual mode (#17864)
Problem:    Visual area not fully updated when removing sign in Visual mode
            while scrolling.
Solution:   Adjust check for topline. (closes vim/vim#10017)
abb6fbd14d
2022-03-26 08:52:54 +08:00
zeertzjq
c2378be3dd
vim-patch:8.2.3453: autocmd not executed when editing a directory (#17846)
Problem:    Autocmd not executed when editing a directory ending in a path
            separator inside try block.
Solution:   Return NOTDONE instead of FAIL. (closes vim/vim#8885)
40fa12aea3
2022-03-26 08:27:29 +08:00
dundargoc
876d22fca9
fix(clang/'Dead store'): do not assign endcol (#17788) 2022-03-25 18:02:42 -06:00
dundargoc
61205c1def
chore: fix typos (#17755)
Co-authored-by: Jordan Haine <jhaine@securitycompass.com>
2022-03-25 19:57:59 +01:00
Javier Lopez
174deafcef
docs(api): improve autocommand docs (#17545)
[skip ci]
2022-03-25 19:24:53 +01:00
Jared Weakly
5e64d65df6
fix(filetype.lua): always return a string in getline helper function (#17852)
Uses of `getline` in `filetype.lua` currently assume it always returns a
string. However, if the buffer is unloaded when filetype detection runs,
`getline` returns `nil`. Fixing this prevents errors when filetype
detection is run on unloaded buffers.
2022-03-25 12:12:00 -06:00
Christian Clason
d72e82d3db
build(deps): bump luajit to commit e2c312e (#17111)
bump bundled LuaJIT to e2c312e0de
2022-03-25 17:42:32 +01:00
Gregory Anders
b81c310d49
fix(tui): correct CSI sequence (#17844)
Follow up to #17771. The sequence `CSI > 4 ; 1 m` does not enable
distinguishing all available keys; notably, it excludes `<Tab>`. Using
`CSI > 4 ; 2 m` tells the terminal to disambiguate *all* keys, which is
much more useful.

The meaning of the final parameter is documented [here][1].

[1]: https://invisible-island.net/xterm/manpage/xterm.html#VT100-Widget-Resources:modifyOtherKeys
2022-03-24 13:11:04 -06:00
Michael Lingelbach
69f1de86dc
feat: add vim.tbl_get (#17831)
vim.tbl_get takes a table with subsequent string arguments (variadic) that
index into the table. If the value pointed to by the set of keys exists,
the function returns the value. If the set of keys does not exist, the
function returns nil.
2022-03-24 12:01:04 -07:00
bfredl
39af40580a
Merge pull request #17809 from dundargoc/PVS/V1019
fix(PVS/V1019): compound assignment expression is used inside condition
2022-03-24 18:37:23 +01:00
bfredl
27fccb295c
Merge pull request #17771 from gpanders/extendedkeys
feat(tui): enable CSI u keys
2022-03-24 18:13:32 +01:00
Dundar Göc
93e0d9b556 fix(PVS/V1019): compound assignment expression is used inside condition 2022-03-24 17:57:36 +01:00
Gregory Anders
02fd00c042
feat(runtime): include Lua in C++ ftplugin (#17843) 2022-03-24 08:05:13 -06:00
bfredl
b438251a0e
Merge pull request #17838 from zeertzjq/ci-docgen-no-src-lua
ci: remove src/nvim/**.lua from docgen pattern
2022-03-24 14:20:03 +01:00
Gregory Anders
a11ff55555 feat(tui): enable CSI u keys
On TUI startup write the CSI sequence that signals to the controlling
terminal that Neovim supports the CSI u scheme for encoding modifiers
documented in [1].

This is similar to, but distinct from, Vim's usage of the `t_TI` and
`t_TE` variables to handle Xterm's `modifyOtherKeys` setting. For a
longer explanation on those differences see [2]. Since Neovim uses
libtermkey for key input handling, we use the CSI u encoding rather than
Xterm's modifyOtherKeys encoding.

[1]: http://www.leonerd.org.uk/hacks/fixterms/
[2]: https://invisible-island.net/xterm/modified-keys.html
2022-03-24 07:13:49 -06:00
zeertzjq
3b28bd57f9
Merge pull request #17821 from zeertzjq/vim-patch-cursorline
vim-patch:8.2.{4591,4614}: cursorline redrawing
2022-03-24 20:28:46 +08:00
bfredl
1194856b31
Merge pull request #17740 from dundargoc/doxygen/memline
refactor(memline): convert function comments to doxygen format
2022-03-24 13:15:20 +01:00
zeertzjq
4a11c7e56f
chore(nvim_paste): assert the correct String (#17752) 2022-03-24 19:40:00 +08:00
dundargoc
534f5a419d
refactor: convert function comments to doxygen format (#17710) 2022-03-24 12:17:21 +01:00
Lewis Russell
fcd57980f9
chore: add additional compiler flags (#17815)
Added:
  - -Wdouble-promotion
  - -Wmissing-noreturn
  - -Wmissing-format-attribute
  - -Wsuggest-attribute={pure,const,malloc,cold}

Resolves: #343
2022-03-24 12:14:04 +01:00
bfredl
0c45753119
Merge pull request #17825 from bfredl/ctrl2
feat(input)!: distinguish ctrl input pairs (always)
2022-03-24 12:05:36 +01:00
Dundar Göc
8b7f818ee7 refactor(memline): convert function comments to doxygen format 2022-03-24 11:19:15 +01:00
bfredl
ed88ca7503 feat(input): enable <tab>/<c-i>, <cr>/<c-m>, <esc>/<c-[> pairs unconditionally 2022-03-24 11:02:39 +01:00
zeertzjq
d7488bf386 feat(input)!: delay some conversions to vgetc() 2022-03-24 11:02:39 +01:00
zeertzjq
c29a14d1fa perf(screen): reduce cursorline redrawing when jumping around
vim-patch:8.2.4614: redrawing too much when 'cursorline' is set

Problem:    Redrawing too much when 'cursorline' is set and jumping around.
Solution:   Rely on win_update() to redraw the current and previous cursor
            line, do not mark lines as modified. (closes vim/vim#9996)
c20e46a4e3

This doesn't match the patch exactly, because I missed some lines when
porting patch 8.1.2029, and these lines were removed in this patch.

This also makes win_update() always update for 'concealcursor' like how
it always updates for 'cursorline', as 'cursorline' and 'concealcursor'
redrawing logic has been unified in Nvim.

As redrawing for 'cursorline' now always only requires VALID redraw
type, it is no longer necessary to call redraw_for_cursorline() in
nvim_win_set_cursor().
2022-03-24 16:08:59 +08:00
zeertzjq
3e9b4e917d vim-patch:8.2.4591: cursor line not updated when a callback moves the cursor
Problem:    Cursor line not updated when a callback moves the cursor.
Solution:   Check if the cursor moved. (closes vim/vim#9970)
e7a74d5375

redraw_after_callback() is N/A. Nvim handles timers on the main loop.
2022-03-24 16:08:59 +08:00
zeertzjq
a72f338d76
fix(float): do not switch window before deleting last listed buffer (#17840)
Just allow close_windows() to close the current window instead.
This fixes wrong working directory or autocommands not being triggered.
2022-03-24 14:53:20 +08:00
zeertzjq
ff82b2785f
fix(float): don't always switch window when deleting last listed buffer (#17836) 2022-03-24 11:56:22 +08:00
zeertzjq
fc3bff6b7e ci: remove src/nvim/**.lua from docgen pattern
After #17623 this pattern is no longer necessary.
2022-03-24 11:35:24 +08:00
zeertzjq
2e36117840
test: add test for deleting last listed buffer when there are floats (#17833) 2022-03-24 09:28:23 +08:00
dundargoc
d3af109d10
fix(PVS/V560): ignore false "conditional expression is always false" (#17830)
"'qi' points to the global variable 'ql_info' or the window local location list stack 'wp->w_llist'.  The contents of these structures can be changed out-of-band by an autocmd."

https://github.com/vim/vim/pull/9993#issuecomment-1076544168
2022-03-24 06:25:20 +08:00
zeertzjq
06131370a4
refactor(memline.c): make swapfile_unchanged() return bool (#17827)
vim-patch:8.2.4613: return type of swapfile_unchanged() is wrong

Problem:    Return type of swapfile_unchanged() is wrong.
Solution:   Use "int". (closes vim/vim#10000  Yeah!)
3c5999e53d
2022-03-23 22:33:34 +08:00
zeertzjq
52fe8eae07
fix(screen): do not update syntax_last_parsed when drawing folded line (#17826) 2022-03-23 20:23:41 +08:00
zeertzjq
f5a3edb0c0
refactor: remove cpo-& behavior (#17745)
cpo-& has been removed, but its behavior was accidentally made the
default behavior. That should be removed instead.
2022-03-23 19:52:50 +08:00
zeertzjq
0621cd3112
Merge pull request #17806 from zeertzjq/win-close-float-fix
Fix some bugs with closing window or buffer when there are floating windows
2022-03-23 18:05:31 +08:00
zeertzjq
a9359dca37 fix(float): make laststatus=1 behave consistently with floating windows 2022-03-23 09:07:21 +08:00
zeertzjq
3fdb7b528d fix(float): handle buffer deletion with floating windows 2022-03-23 09:07:21 +08:00
zeertzjq
3539456f49 fix(win_close): count the window the be closed instead of curwin 2022-03-23 09:07:21 +08:00
zeertzjq
89712dcbf8 fix(aucmd_win): always make aucmd_win the last window 2022-03-23 09:07:21 +08:00
zeertzjq
7735163652
fix(screen): do not do syntax highlighting at filler or folded lines (#17818) 2022-03-23 07:07:34 +08:00
zeertzjq
159111f9a5
refactor(ui_refresh): only save/restore p_lz if calling screen_resize() (#17794) 2022-03-23 06:34:45 +08:00
Lewis Russell
7863e6b709
vim-patch:8.2.1078: highlight and match functionality together in one file (#17805)
Problem:  Highlight and match functionality together in one file.
Solution: Move match functionality to a separate file. (Yegappan Lakshmanan,
          closes vim/vim#6352)

06cf97e714
2022-03-23 06:31:50 +08:00