Problem: Comparing functions and partials doesn't work well.
Solution: Add tests. (Nikolai Pavlov) Compare the dict and arguments in the
partial.
8e759ba865
Problem: When using a partial on a dictionary it always gets bound to that
dictionary.
Solution: Make a difference between binding a function to a dictionary
explicitly or automatically.
1d429610bf
Problem: Leaking memory when there is a cycle involving a job and a
partial.
Solution: Add a copyID to job and channel. Set references in items referred
by them. Go through all jobs and channels to find unreferenced
items. Also, decrement reference counts when garbage collecting.
107e1eef1d
Problem: Double free when a partial is in a cycle with a list or dict.
(Nikolai Pavlov)
Solution: Do not free a nested list or dict used by the partial.
ddecc25947
Problem: When a dict contains a partial it can't be redefined as a
function. (Nikolai Pavlov)
Solution: Remove the partial when overwriting with a function.
c5fbe8af4c
Problem: When binding a function to a dict the reference count is wrong.
Solution: Decrement dict reference count, only reference the function when
actually making a copy. (Ken Takata)
e4eb6ff089
Problem: Comparing a function that exists on two dicts is not backwards
compatible. (Thinca)
Solution: Only compare the function, not what the partial adds.
f0e86a0dbd
Problem: Having type() handle a Funcref that is or isn't a partial
differently causes problems for existing scripts.
Solution: Make type() return the same value. (Thinca)
953cc7fb13
Problem: Get E923 when using function(dict.func, [], dict). (Kent Sibilev)
Storing a function with a dict in a variable drops the dict if the
function is script-local.
Solution: Translate the function name. Use dict arg if present.
6f2e4b36c9
Problem: Using ":call dict.func()" where the function is a partial does
not work. Using "dict.func()" where the function does not take a
Dictionary does not work.
Solution: Handle partial properly in ":call". (Yasuhiro Matsumoto)
65639032bb
Previously, free_oldval was set immediately on entering
did_set_string_option. However, opt_idx hadn't been adjusted to account
for diverting 'viminfo' manipulation to 'shada'.
Therefore, the code which determines whether to free the old value was
looking at the flags for 'viminfo' while the code which sets whether a
value was allocated was modifying the flags for 'shada'. This led to a
leak of any values set for 'viminfo'.
Updating free_oldval once opt_idx has been adjusted for the
'viminfo'/'shada' handling ensures the check/set values are consistent.
Closes#5698
Fix session load with winminheight/winminwidth >1.
Problem: Vim temporarily sets winheight/winwidth to 1 while loading
session. If user has his minimum window size set higher, this
causes an error.
Solution: Temporarily set winminheight/winminwidth, and restore the
original values (in the right order) when finishing session read.
The order of the compound 'set' command is important, if it is
wrong there will be an error.
Instead of managing max_visits, check the time every N visits. This avoids edge
cases where max_visits is large but the chunk frequency slowed down, which would
causing the "..." pulse to show for a very long time. It's more important to
show output at reasonable intervals than to avoid calling os_hrtime().
This ameliorates use-cases like:
:!cat foo.txt
:make
where the user is interested in the last few lines of output.
Try these shell-based ex-commands before/after this commit:
:grep -r '' *
:make
:!yes
:!grep -r '' *
:!git grep ''
:!cat foo
:!echo foo
:!while true; do date; done
:!for i in `seq 1 20000`; do echo XXXXXXXXXX $i; done
In all cases the last few lines of the command should always be shown,
regardless of where throttling was triggered.
- By re-enabling code blocks (every line that doesn't begin with a "-" and is
indented by at least 4 spaces), we prevent the Markdown syntax to evaluate "_"
as beginning for italic text.
That's the case for `:CheckHealth deoplete` for instance. It would output:
$ cat /tmp/log_{PID}
Since the deoplete check gets run first, almost all of the following
`:CheckHealth` output would be italic.
- Since we re-enable code blocks, we now have to tell our custom syntax that it
can be part of markdownCodeBlock as well. Otherwise there would be no
highlithing for our keywords ERROR, INFO, etc. after 4 spaces of indent.
- Since we do the above anyway, we make it work for mkdListItemLine as well.
That's a highlight group from `plasticboy/vim-markdown` opposed to the shipped
markdown syntax (which essentially is `tpope/vim-markdown`). Before this patch
there was no highlighting at all in the `:CheckHealth` output.
Periodically skip :! spam. This is a "cheat" that works for all UIs and greatly
improves responsiveness when :! spams MB or GB of output:
:!yes
:!while true; do date; done
:!git grep ''
:grep -r '' *
After ~10KB of data is seen from a single :! invocation, output will be skipped
for ~1s and three dots "..." will pulse in the bottom-left. Thereafter the
behavior alternates at every:
* 10KB received
* ~1s throttled
This also avoids out-of-memory which could happen with large :! outputs.
Note: This commit does not change the behavior of execute(':!foo').
execute(':!foo') returns the string ':!foo^M', it captures *only* Vim
messages, *not* shell command output. Vim behaves the same way.
Use system('foo') for capturing shell command output.
Closes#1234
Helped-by: oni-link <knil.ino@gmail.com>
Closes#1234
multiqueue:
- Implement multiqueue_size()
- Rename MultiQueueItem.parent to MultiQueueItem.parent_item, to avoid confusion
with MultiQueue.parent.