bfredl
0806c882cd
Merge pull request #19584 from bfredl/terminal_c_BSL_c_O
...
implement <c-\><c-o> key for terminal mode
2022-08-02 14:53:20 +02:00
bfredl
9092540315
feat(terminal): implement <c-\><c-o> for terminal mode
...
this works similar to <c-o> or <c-\><c-o> in insert mode
2022-08-02 13:54:41 +02:00
bfredl
68ec497d52
Merge pull request #19437 from dundargoc/refactor/char_u-to-char
...
refactor: replace char_u with char
2022-07-31 15:55:01 +02:00
bfredl
fc5ed5b672
Merge pull request #19524 from dundargoc/refactor/conversion-screen
...
refactor: enable -Wconversion warning for screen.c
2022-07-30 22:53:51 +02:00
bfredl
b6b9f46041
Merge pull request #19525 from dundargoc/refactor/conversion-search
...
refactor: enable -Wconversion warning for search.c
2022-07-27 19:07:45 +02:00
bfredl
18755c6b89
Merge pull request #19516 from dundargoc/refactor/conversion-mbyte
...
refactor: enable -Wconversion warning for mbyte.c
2022-07-27 19:00:40 +02:00
bfredl
598cbcae4a
Merge pull request #19445 from famiu/fix/local_winbar_tabs
...
fix: local winbar with tabs
2022-07-20 16:57:38 +02:00
bfredl
243038188b
Merge pull request #19446 from bfredl/fixarray
...
refactor(object): get rid of redundant FIXED_TEMP_ARRAY
2022-07-20 10:36:44 +02:00
bfredl
c65e73f2d6
refactor(object): get rid of redundant FIXED_TEMP_ARRAY
...
use the MAXSIZE_TEMP_ARRAY + ADD_C pattern instead, as exemplified
by the changes in this commit.
2022-07-20 10:04:06 +02:00
bfredl
101fd04ee2
Merge pull request #19409 from bfredl/uiunpack
...
perf(ui): some ui_client fixes/optimizations before externalized TUI
2022-07-19 13:08:11 +02:00
bfredl
f87c824513
fix(rpc): break nvim_error_event feedback loop between two nvim instances
...
In case nvim A sends nvim_error_event to nvim B, it would
respond with another nvim_error_event due to unknown
request name. Fix this by adding dummy request handler for now.
2022-07-19 12:38:37 +02:00
bfredl
0b63f5afad
perf(ui): unpack grid_line (screen contents) directly
2022-07-19 12:38:37 +02:00
bfredl
93bd6fb2c8
Merge pull request #19427 from Maverun/maveBranchDoc
...
fix(docs): remove internal function from docs (nvim__*)
2022-07-19 12:10:03 +02:00
bfredl
be3d2f5125
perf(ui): avoid ui_flush() work in headless mode
2022-07-18 14:08:44 +02:00
bfredl
45bee1dafd
perf(ui): eliminate spurious memory allocations for hl_attr_define event
2022-07-18 14:08:44 +02:00
bfredl
67a04fe6cb
perf(ui): unpack a single ui event at a time, instead of a "redraw" batch
...
This reduces the memory overhead for large redraw batches, as a much smaller
prefix of the api object buffer is used and needs to be hot in cache.
2022-07-18 14:08:44 +02:00
bfredl
c6c89391b7
Merge pull request #19205 from bfredl/luaerr
...
fix(lua): don't leak memory on error
2022-07-02 23:44:26 +02:00
bfredl
0160ff6aa0
fix(lua): don't leak memory on error
2022-07-02 20:10:32 +02:00
bfredl
c1b591dc8f
Merge pull request #19137 from dundargoc/refactor/char_u-to-char
...
refactor: replace char_u
2022-07-02 17:13:25 +02:00
bfredl
ba5be650a7
Merge pull request #19134 from dundargoc/refactor/conversion
...
refactor: enable -Wconversion warning for fileio.c
2022-06-30 11:51:07 +02:00
bfredl
21a1f1f552
Merge pull request #19133 from famiu/feat/api/cmd_support_filter
...
feat(api): make `nvim_parse_cmd` and `nvim_cmd` support :filter
2022-06-29 09:12:01 +02:00
bfredl
3cc8559963
Merge pull request #19141 from bfredl/mapchar
...
refactor: define builtin mappings and autocmds without pseudo-excmds
2022-06-29 00:46:25 +02:00
bfredl
7ab2e12ebc
refactor(aucmd): call define_autocmd() directly for default autocmds
2022-06-28 23:41:46 +02:00
bfredl
83170a4986
refactor(map): simplify add_map params
2022-06-28 23:40:27 +02:00
bfredl
0c363d1a70
Merge pull request #19122 from dundargoc/refactor/conversion
...
refactor: enable -Wconversion warning for message.c
2022-06-27 17:07:21 +02:00
bfredl
f10489d9c2
Merge pull request #19077 from dundargoc/refactor/conversion
...
refactor: enable -Wconversion warning for ex_cmds.c
2022-06-27 10:09:33 +02:00
bfredl
69e7b664d8
Merge pull request #19090 from bfredl/luaprg
...
fix(build): don't disable byte precompilation on debug builds
2022-06-25 20:30:43 +02:00
bfredl
cb58b673e5
fix(build): don't disable byte precompilation on debug builds
...
This special casing is redundant since long, as you can disable
the binary cache regardless of build type with the --luamod-dev flag
2022-06-25 19:24:48 +02:00
bfredl
88a5941598
Merge pull request #19041 from lewis6991/globallocal
...
fix(api): nvim_set_option_value for global-local options
2022-06-25 11:09:55 +02:00
bfredl
12c62ddea6
Merge pull request #19071 from bfredl/minimap
...
perf(map): some optimizations when setting mappings
2022-06-24 16:20:13 +02:00
bfredl
777faa29b3
refactor(map): statically initialize maphash array
2022-06-24 14:40:27 +02:00
bfredl
f3ee62a743
refactor(map): simplify free_all_mem handling
2022-06-24 14:40:09 +02:00
bfredl
a8ecc1ae6d
perf(map): avoid extraneous heap allocations when setting mappings
...
- don't immediately vim_strsave and then xfree a heap buffer.
- allow replace_termcodes to take in a buffer instead of allocating it
- grug! memory allocation bad!
2022-06-24 13:53:42 +02:00
bfredl
614fd3a883
perf(map): visit only one hash bucket instead of all, like an actual hash table
2022-06-24 12:56:24 +02:00
bfredl
05ca14a881
Merge pull request #19058 from bfredl/miniopt
...
perf(highlight): use binary search to lookup RGB color names
2022-06-23 13:42:57 +02:00
bfredl
a3ce03bef1
Merge pull request #19020 from echasnovski/screenchar-float
...
fix(float): make `screen*()` functions respect floating windows
2022-06-23 12:01:27 +02:00
bfredl
9690f8c57b
perf(highlight): use binary search to lookup RGB color names
2022-06-23 11:48:12 +02:00
bfredl
dd591adf8a
Merge pull request #19039 from bfredl/multicolor
...
perf: get rid of unnecessary allocations in highlight groups
2022-06-22 10:49:36 +02:00
bfredl
04592759fa
Merge pull request #19043 from dundargoc/cmake
...
build(cmake): use glob_wrapper instead of file(GLOB ...) in main CMakeLists
2022-06-22 00:06:35 +02:00
bfredl
8cd94e3bc0
perf(ui): remove spurious allocations from mode_style_array()
2022-06-21 18:40:35 +02:00
bfredl
a9442c532e
perf(highlight): allocate permanent names in an arena for fun and cache locality
2022-06-21 18:40:35 +02:00
bfredl
1dad288432
refactor: remove atrocious HL_TABLE()[idx] syntax before I poke my eyes out
2022-06-21 18:40:35 +02:00
bfredl
ce7d18f86a
refactor(highlight): get rid of syn_unadd_group()
...
This is a sham. if the user does
hi ExistingGroup guifg=AliceBlue invalidkey=foobar
the "guifg" part will still be executed. No need to micro-manage
the same case where ANewGroup is added instead.
2022-06-21 18:40:35 +02:00
bfredl
374e0b6678
perf(highlight): don't allocate duplicates for color names
2022-06-21 18:40:33 +02:00
bfredl
5ad97fcc0e
perf(highlight): get rid of local memory allocations for "{key}={arg}"
2022-06-21 18:09:11 +02:00
bfredl
e3bfc1293e
Merge pull request #18988 from bfredl/uipack
...
refactor(ui): encode "redraw" events without intermediate allocations
2022-06-20 15:04:40 +02:00
bfredl
5d69872105
perf(ui): reduce allocation overhead when encoding "redraw" events
...
Note for external UIs: Nvim can now emit multiple "redraw" event batches
before a final "flush" event is received. To retain existing behavior,
clients should make sure to update visible state at an explicit "flush"
event, not just the end of a "redraw" batch of event.
* Get rid of copy_object() blizzard in the auto-generated ui_event layer
* Special case "grid_line" by encoding screen state directly to
msgpack events with no intermediate API events.
* Get rid of the arcane notion of referring to the screen as the "shell"
* Array and Dictionary are kvec_t:s, so define them as such.
* Allow kvec_t:s, such as Arrays and Dictionaries, to be allocated with
a predetermined size within an arena.
* Eliminate redundant capacity checking when filling such kvec_t:s
with values.
2022-06-20 12:44:56 +02:00
bfredl
279bc71f3c
Merge pull request #18760 from kevinhwang91/fix-treesitter-fold
...
fix(treesitter): new iter if folded
2022-06-16 18:29:27 +02:00
bfredl
2a2fb8be74
Merge pull request #18880 from bfredl/arena
...
perf(memory): use an arena for RPC decoding
2022-06-14 15:20:37 +02:00
bfredl
3f5c647de9
perf(memory): use an arena for RPC decoding
...
drawback: tracing memory errors with ASAN is less accurate for arena
allocated memory.
Therefore, to start with it is being used for Object types around
serialization/deserialization exclusively. This is going to have
a large impact especially when TUI is refactored as a co-prosess
as all UI events will be serialized and deserialized by nvim itself.
2022-06-14 14:33:04 +02:00
bfredl
2f71d4708e
Merge pull request #18902 from bfredl/fulexit
...
fix(tests): check for EOF in requests to nvim properly
2022-06-13 11:23:40 +02:00
bfredl
e3281d992e
fix(tests): check for EOF on exit of nvim properly
2022-06-13 10:15:44 +02:00
bfredl
feba56af7d
Merge pull request #18936 from bfredl/apioption
...
refactor(api): reorganize code
2022-06-12 21:01:16 +02:00
bfredl
612944c586
refactor(api): update vimdoc
2022-06-12 19:45:39 +02:00
bfredl
0d63fafcda
refactor(api): move command related API to separate file
2022-06-12 19:45:39 +02:00
bfredl
a907d6f517
refactor(api): move extmark specific functions to api/extmark.c
2022-06-12 16:45:18 +02:00
bfredl
4a275e3291
refactor(api): move option code to own file
2022-06-12 16:09:42 +02:00
bfredl
502f03fc06
Merge pull request #18919 from bfredl/multiattr
...
fix(messages): add color when showing nvim_echo in :messages history
2022-06-11 23:06:05 +02:00
bfredl
f4121c52b9
fix(messages): add color when showing nvim_echo in :messages history
2022-06-11 22:29:51 +02:00
bfredl
c87a5ebbc3
Merge pull request #18428 from bfredl/do_source
...
feat(api): nvim__get_runtime do_source
2022-06-11 11:32:23 +02:00
bfredl
e92fcdbab2
feat(api): nvim__get_runtime do_source
2022-06-11 10:25:59 +02:00
bfredl
673b3a780e
Merge pull request #18461 from dundargoc/refactor/change-linenr-to-int32
...
refactor: change type of linenr_T from long to int32_t
2022-06-10 19:28:47 +02:00
bfredl
f48aa68e08
Merge pull request #18896 from famiu/fix/nvim_create_user_command/smods
...
fix(nvim_create_user_command): make `smods` work with `nvim_cmd`
2022-06-08 12:41:59 +02:00
bfredl
057a280867
Merge pull request #18870 from zbirenbaum/winhl-cursor
...
fix(highlight): let winhighlight use cursor
2022-06-07 14:52:35 +02:00
bfredl
e13dcdf162
Merge pull request #18864 from bfredl/optcut
...
perf(tests): don't invoke nvim_get_all_options_info until needed
2022-06-05 00:48:43 +02:00
bfredl
545dc82c1b
perf(tests): don't invoke nvim_get_all_options_info until needed
...
This call alone is responible of 40 000 000 out of 80 000 000
individual alloc/free calls in the test suite.
2022-06-05 00:11:57 +02:00
bfredl
79a194a278
Merge pull request #18861 from bfredl/norplugin
...
fix(startup): nvim with --clean should not load user rplugins
2022-06-04 19:25:52 +02:00
bfredl
aad20de5ab
fix(startup): nvim with --clean should not load user rplugins
...
runtime rplugins such like legacy script providers are not affected
by this change.
2022-06-04 18:37:54 +02:00
bfredl
64e946c50f
Merge pull request #18848 from bfredl/backevenagain
...
fix(log): back even again
2022-06-03 17:02:47 +02:00
bfredl
8c86feb930
fix(log): back even again
2022-06-03 16:26:50 +02:00
bfredl
dd0e9910da
Merge pull request #18846 from bfredl/unpackfix
...
fix(api): some robustness issues in api_parse_enter
2022-06-03 15:02:10 +02:00
bfredl
61e33f312e
Merge pull request #18845 from bfredl/threadlog
...
fix(logging): make logmsg() thread-safe again
2022-06-03 14:55:56 +02:00
bfredl
7264444873
fix(api): some robustness issues in api_parse_enter
2022-06-03 12:01:24 +02:00
bfredl
640c695a7b
fix(logging): make logmsg() thread-safe again
...
problem: data race when `recursive` is read outside of mutex by thread A
while thread B has taken the mutex and modifies it.
solution: use a recursive lock.
ref #18764
2022-06-03 11:08:32 +02:00
bfredl
9745941ef6
Merge pull request #18730 from bfredl/apiconvert
...
convert API types using mpack instead of msgpack
2022-06-02 23:01:21 +02:00
bfredl
d5f047bee0
refactor(api): use a unpacker based on libmpack instead of msgpack-c
...
Currently this is more or less a straight off reimplementation,
but this allow further optimizations down the line, especially
for avoiding memory allocations of rpc objects.
Current score for "make functionaltest; make oldtest" on a -DEXITFREE build:
is 117 055 352 xfree(ptr != NULL) calls (that's NUMBERWANG!).
2022-06-02 16:05:24 +02:00
bfredl
285f6518e6
Merge pull request #18831 from dundargoc/ci/disable-perl-macos
...
ci(provider): skip perl provider tests on macos
2022-06-02 09:46:37 +02:00
bfredl
7380ebfc17
Merge pull request #18194 from famiu/feat/usercmd_preview
...
feat: user command "preview" (like inccommand)
2022-05-31 17:44:13 +02:00
bfredl
b5dd562e08
fix(docs): correct obsolete note about 'writedelay' in dev docs
2022-05-31 00:20:10 +02:00
bfredl
8427da9299
Merge pull request #18798 from bfredl/doublehash
...
refactor(api): use hashy hash for looking up api method and event names
2022-05-30 20:09:51 +02:00
bfredl
1f63052b68
refactor(api): use hashy hash for looking up api method and event names
...
This avoids generating khash tables at runtime, and is consistent with
how evalfuncs lookup work.
2022-05-30 14:11:01 +02:00
bfredl
ebad151a2a
Merge pull request #18792 from famiu/feat/nvim_create_user_command/smods
...
feat(api): pass structured modifiers to commands
2022-05-29 15:23:51 +02:00
bfredl
0dd3798dbb
Merge pull request #18776 from famiu/fix/winbar_noroom
...
fix(winbar): only allow adding winbar when there is space
2022-05-28 12:18:04 +02:00
bfredl
30915cc8b0
Merge pull request #18306 from lewis6991/fnfast
...
feat(lua): allow some viml functions to run in fast
2022-05-26 15:03:07 +02:00
bfredl
24352cba01
Merge pull request #18528 from lewis6991/setwinopt
...
feat(api): add `win` and `buf` to `nvim_set_option_value`
2022-05-25 17:05:28 +02:00
bfredl
c2f4920d3b
Merge pull request #18712 from famiu/feat/ui/winbar_redraw
...
fix(ui): redraw winbar alongside statusline
2022-05-23 16:32:35 +02:00
bfredl
5250d5c1b1
Merge pull request #18646 from bfredl/winbarruler
...
fix(winbar): allow winbar to display a ruler
2022-05-22 19:43:30 +02:00
bfredl
7f6d2984a8
Merge pull request #18608 from ckipp01/extmarkDocs
...
docs(extmark): remove message about passing in id=0
2022-05-22 19:07:51 +02:00
bfredl
060ef52d8b
fix(winbar): allow winbar to display the ruler
2022-05-22 18:56:07 +02:00
bfredl
b863c150c9
Merge pull request #18696 from bfredl/quickinc
...
fix(tests): fix some issues with ui/inccommand_spec.lua causing slowness
2022-05-22 17:51:31 +02:00
bfredl
9b34723bcc
Merge pull request #18693 from bfredl/quicklsp
...
fix(ci): remove 2000ms blocking wait in many plugin/lsp_spec.lua tests
2022-05-22 16:25:17 +02:00
bfredl
e01c197eab
fix(tests): fix some issues with ui/inccommand_spec.lua causing slowness
...
from ~30 to ~20 secs with ASAN build
- feedkeys test: the same substitute was repeated, and not even correctly spelled
- don't clear() in a tight loop. "bwipe!" is enough to erase undo history
- error in cnoremap mapping causes a check_for_delay(). <c-c> it away.
2022-05-22 16:17:37 +02:00
bfredl
e7b3fd8ad6
Merge pull request #18681 from bfredl/uitest
...
fix(tests): fix some screen.lua warnings
2022-05-22 14:32:38 +02:00
bfredl
58b9b7e7c4
fix(ci): remove 2000ms blocking wait in many plugin/lsp_spec.lua tests
...
Cuts down typical run time for `plugin/lsp_spec.lua`
from 70 secs to 12 secs in ASAN CI build.
This happens in ASAN/EXIT_FREE builds where nvim waits 2000ms due to
unclosed handled. I wasn't able to pin-point the exact cause.
But these tests ran in nested context where two server/client pairs
were setup for no good reason. Moving these tests out so only one client
is being setup fixed the exit hang.
2022-05-22 14:14:58 +02:00
bfredl
cbf0360179
Merge pull request #13729 from devbhansingh/ui_enter_prompt
...
feat(ui): clear message history explicitly with msg_history_clear event
2022-05-21 23:59:14 +02:00
bfredl
3c1bc75447
fix(tests): fix some screen.lua warnings
2022-05-21 23:07:34 +02:00
bfredl
c847a0eeb7
Merge pull request #18664 from famiu/fix/winbar_crash
...
fix: prevent crash when statusline expression sets value of 'winbar'
2022-05-20 19:29:34 +02:00
bfredl
ffb55261a8
Merge pull request #18653 from dundargoc/refactor/move-reverse-text
...
refactor: move reverse_text to strings.c as it's a string operation
2022-05-20 17:00:51 +02:00
bfredl
1d160a76ec
Merge pull request #18641 from famiu/fix/nvim_cmd/keymap_error_suppress
...
fix: make `nvim_cmd` not suppress errors inside key mapping
2022-05-20 14:22:44 +02:00
bfredl
69853a622a
Merge pull request #18629 from famiu/fix/ui/winbar
...
fix(ui): make `winbar` properly equalize window heights for local value
2022-05-19 21:58:48 +02:00