Problem: 'showbreak' does not work for a very long line. (John Little)
Solution: Check whether 'briopt' contains "sbr". (Ken Takata, closesvim/vim#5523,
closesvim/vim#5684)
1aa76b8fd0
viml/profile: fix missing fixes when merging vim-patch:8.1.0130
Fix#12255
### Steps to reproduce using `nvim -u NORC`
```
nvim -u NORC
:function Test()
:endfunction
:profile start log1
:profile func Test
:call Test()
:profile stop
:profile start log2
:profile func Test
:call Test()
:profile stop
```
### Actual behaviour
#### log1
```
FUNCTION Test()
Called 1 times
...
```
#### log2
```
FUNCTION Test()
Called 2 times
...
```
### Expected behaviour
#### log1
```
FUNCTION Test()
Called 1 times
...
```
#### log2
```
FUNCTION Test()
Called 1 times
...
```
* Make apply_text_edits non-ASCII safe
Use `vim.str_byteindex` to correct starting and ending positions for text edits if the line contains non-ASCII characters.
Fixes#12221
* text_edit may be applied to other buffers
* make sure the buffer is loaded
* add comments
* add test for non-ASCII edits
* lsp: handle kinds not specified in protocol
fix: #12200
If the client set "symbolKind.valueSet",
the client must handle it properly even if it receives a value outside the specification.
* test: add lsp.util.{get_completion_item_kind_name, get_symbol_kind_name} test case
* lsp: make lsp.util.{get_completion_item_kind_name, get_symbol_kind_name} private
Problem: Using closure may consume a lot of memory.
Solution: unreference items that are no longer needed. Add a test. (Ozaki
Kiichi, closesvim/vim#3961)
209b8e3e3b
Besides the special-case in get_scrolloff_value(), it makes sense for
'scrolloff' and 'sidescrolloff' to reflect the correct values (for
plugins, scripts, …).
ref 53d607af9c53accfd634435908fb79061f1212b9
ref #11915
ref #12230
:echo expand('%', v:false, v:true)
==423== 28 bytes in 1 blocks are definitely lost in loss record 124 of 420
==423== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==423== by 0x2AD09C: try_malloc (memory.c:71)
==423== by 0x2AD0B8: xmalloc (memory.c:105)
==423== by 0x2AE05D: xmallocz (memory.c:182)
==423== by 0x1F7CF4: vim_strnsave (strings.c:68)
==423== by 0x318813: eval_vars (ex_docmd.c:8885)
==423== by 0x34F5FC: f_expand (funcs.c:2058)
==423== by 0x36D023: call_func (eval.c:6419)
==423== by 0x370C28: get_func_tv.lto_priv.707 (eval.c:6150)
==423== by 0x372748: eval7 (eval.c:4326)
==423== by 0x37291A: eval6 (eval.c:4036)
==423== by 0x372BF6: eval5 (eval.c:3884)
lsp.util.buf_versions must be set in advance.
Use helper.insert to create an anonymous buffer,
so create a named buffer for testing without using insert.
Problem: Pattern for 'hlsearch' highlighting may leak. (Dominique Pelle)
Solution: Call end_search_hl() to make sure the previous pattern is freed.
(closesvim/vim#6028)
0b6849e9e3
Problem: Crash if triggering garbage collector after a function call.
(Michael Henry)
Solution: Don't call the garbage collector right away, do it later.
(closesvim/vim#3894)
889da2f243
Problem: May use a lot of memory when a function creates a cyclic
reference.
Solution: After saving a funccal many times, invoke the garbage collector.
(closesvim/vim#3835)
4456ab527a
Problem: Undo problem whn an InsertLeave autocommand resets undo. (Kutsan
Kaplan)
Solution: Do not create a new undo block when leaving Insert mode.
db93495d27