Commit Graph

10791 Commits

Author SHA1 Message Date
Justin M. Keyes
fe7ab60af7 API: nvim_call_dict_function: eliminate internal param
The `internal` param is difficult to explain, and will rarely be
anything but `true`.  To avoid it, use a hack: check if the resolved
dict value starts with "function(".
2018-05-06 14:38:26 +02:00
Justin M. Keyes
19c2ce1901 refactor: nvim_call_dict_function
- Add test coverage for errors.
- Rename, rearrange.
2018-05-06 14:38:26 +02:00
Sebastian Witte
124275dd58 API: nvim_call_dict_function #3032 2018-05-06 14:38:26 +02:00
Justin M. Keyes
f46f138fb6 test: nvim_call_function: verify "too many arguments" error 2018-05-06 14:38:26 +02:00
Jan Viljanen
8abd677d82 CI/travis: remove reference to non-exisiting script (#8366) 2018-05-06 11:40:59 +02:00
Jan Viljanen
f8575fd1e4 CI/travis: fix building 32bit on linux (#8365)
Fixes #8351
2018-05-06 11:33:21 +02:00
raichoo
8ce6393048 terminal: Leave 'relativenumber' alone (#8360)
ref #6796
2018-05-05 18:45:15 +02:00
James McCoy
bcc9a74e48
Merge pull request #8333 from jamessan/ccache
travis: Enable ccache
2018-05-04 19:43:43 -04:00
James McCoy
5009317525
Merge pull request #8358 from mhinz/screen
[RFC] screen: avoid artifacts
2018-05-04 19:42:58 -04:00
Marco Hinz
ec1a7791b0
test: screen artifacts 2018-05-04 22:14:27 +02:00
Marco Hinz
16ce2e006b
screen: avoid artifacts
Put back the condition that was accidentally removed in
d42f934bcb

  -    if (enc_utf8 && ScreenLinesUC[off] != 0)
  -      bytes[utfc_char2bytes(off, bytes)] = NUL;
  -    else if (enc_dbcs == DBCS_JPNU && ScreenLines[off] == 0x8e) {
  -      bytes[0] = ScreenLines[off];
  -      bytes[1] = ScreenLines2[off];
  -      bytes[2] = NUL;
  -    } else if (enc_dbcs && MB_BYTE2LEN(bytes[0]) > 1) {
  -      bytes[1] = ScreenLines[off + 1];
  -      bytes[2] = NUL;
  -    }
  +    bytes[utfc_char2bytes(off, bytes)] = NUL;

Fixes #8357
2018-05-04 20:59:51 +02:00
Björn Linse
0a349fd77d
Merge pull request #8356 from bfredl/tabmsg
messages: redraw tabline if it was overdrawn by messages
2018-05-04 20:54:08 +02:00
Björn Linse
0d037ad978 messages: redraw tabline if it was overdrawn by messages
fixes #8354

Regression from #8088, where we try to avoid clearing the screen
if not absolutely necessary
2018-05-04 09:15:19 +02:00
Justin M. Keyes
e46534b423 Merge #4486 'refactor: Remove maxmem, maxmemtot options'
After this change we never release blocks from memory (in practice it
never happened because the memory limits are never reached).  Let the OS
take care of that.

---

On today's systems the 'maxmem' and 'maxmemtot' values are huge (4+ GB)
so the limits are never reached in practice, but Vim wastes a lot of
time checking if the limit was reached.

If the limit is reached Vim starts saving pieces of the swap file that were in
memory to the disk. Said in a different way: Vim implements its own
memory-paging mechanism. This is unnecessary and inefficient since the
operating system already has virtual memory and will swap to the disk if
programs start using too much memory.

This change does...

1. Reduce the number of config options and need for documentation.
2. Make the code more efficient as we don't have to keep track of memory
   usage nor check if the memory limits were reached to start swapping
   to disk every time we need memory for buffers.
3. Simplify the code. Once memfile.c is simple enough it could be
   replaced by actual operating system memory mapping (mmap,
   MemoryViewOfFile...). This change does not prevent Vim to recover
   changes from swap files since the swapping code is never triggered
   with the huge limits set by default.
2018-05-02 10:14:42 +02:00
Nikolai Aleksandrovich Pavlov
c9e340b7be
Point README to fullhtml PVS report rather then error list
[ci skip]
2018-05-01 21:00:16 +03:00
James McCoy
d5da357925
travis: Enable ccache 2018-05-01 07:02:44 -04:00
Jakson Alves de Aquino
58b210e114 :digraphs : highlight with hl-SpecialKey #2690
closes #2690
2018-05-01 11:33:50 +02:00
Justin M. Keyes
5d6732ff09
Merge #8335 from blueyed/provider 2018-05-01 08:41:43 +02:00
Daniel Hahler
1f2301eacf health#provider: fix sys.path for Python
Remove "" from sys.path (typically the first entry), which could cause
e.g. "logging" to be added from the current directory.
This gets done already for loading the host in
runtime/autoload/provider/pythonx.vim.
2018-04-30 16:54:35 +02:00
Daniel Hahler
7d8327fd30 health#provider: improve error reporting
- quote command, so that e.g. markdown handling is not applied to `__init__.py`
- include cwd
2018-04-30 16:50:01 +02:00
Daniel Hahler
87d3f265bc health#provider: fix logic with s:shellify
It should be quoted if there is any character that needs escaping, but
not if there is a character that does not need escaping.
2018-04-30 16:48:32 +02:00
Justin M. Keyes
4744142fad lint 2018-04-28 11:01:16 +02:00
Andy Russell
6208c7fb98 doc: clarify stdout_buffered docs (#8299)
Fixes #8150
2018-04-28 00:45:55 +02:00
Justin M. Keyes
7e7c3111b6 Merge #4985
closes #4985
2018-04-27 23:37:30 +02:00
Justin M. Keyes
bd17ef75b3 test/unit/undo_spec.lua: fixup after rebase #4985 2018-04-27 13:06:41 +02:00
Justin M. Keyes
d6a1640260 test/util: move general functions into global helpers 2018-04-27 13:06:41 +02:00
Christopher Waldon
34f29ac858 test/unit: some unit tests for undo.c #4985 2018-04-27 13:06:31 +02:00
Justin M. Keyes
53f11dcfc7
Merge #8218 'Fix errors reported by PVS'
closes #4983
2018-04-27 09:25:02 +02:00
Björn Linse
009ccfe170 win: open child stdio handles in overlapped-mode (#8113)
This will be used e.g. by the python client for native asyncio support
2018-04-25 10:11:08 +02:00
Srikanth M
a369385009 ci/travis: fix restore from cache #8316
closes #8281
2018-04-24 21:43:13 +02:00
Justin M. Keyes
ad60927d09
Merge #8304 "default to 'nofsync'" 2018-04-24 02:51:07 +02:00
Justin M. Keyes
77cb14cc6d API: nvim__stats()
Use it to verify fsync() behavior.
2018-04-24 00:44:06 +02:00
Justin M. Keyes
32f3937477 test: fsync() codepaths 2018-04-23 21:29:07 +02:00
ZyX
4ce8521ee4 pvscheck: Disable V011 warning 2018-04-22 20:54:17 +03:00
ZyX
a37819dbb1 spellfile: Fix clint error 2018-04-22 20:35:17 +03:00
ZyX
953d167015 syntax: Fix PVS/V560: condition was already checked 2018-04-22 20:34:32 +03:00
ZyX
76c2a60ff3 spellfile: Fix PVS/V547: allocator now never returns NULL 2018-04-22 20:33:42 +03:00
ZyX
03c2844b53 functests: Fix testlint errors 2018-04-22 20:32:25 +03:00
ZyX
4bab9d34e6 *: Fix clint errors 2018-04-22 20:31:40 +03:00
symphorien
ffb8904913 tui/input.c: add support for mouse release events in urxvt (#8309)
Some terminals don't report which buttons are involved in some mouse
events. For example, the urxvt protocol
(http://www.huge-man-linux.net/man7/urxvt.html section "Mouse
reporting") does not report which button has been released.
In this case libtermkey reports button 0
(http://www.leonerd.org.uk/code/libtermkey/doc/termkey_interpret_mouse.3.html)

Up to now, forward_mouse_event did not handle button==0.
On press events there is not much we can do, and we keep the
current behavior which is dropping the event. But on drag-and-release
events we can compensate by remembering the last button pressed.

fixes #3182 for urxvt
fixes #5400
2018-04-22 19:26:04 +02:00
ZyX
4b41680828 window: Fix PVS/V547: expression already checked in previous if() 2018-04-22 20:25:44 +03:00
ZyX
c8648daab3 window: Silence PVS/V547: height may be changed by curwin ptr 2018-04-22 20:24:57 +03:00
ZyX
d9c010e45d api/vim: Fix PVS/V547: node was already dereferenced, so can’t be NULL 2018-04-22 20:23:50 +03:00
ZyX
a90672fc3d undo: Silence PVS/V547: expression may be false on other system 2018-04-22 20:22:46 +03:00
ZyX
43df2edd20 ui_bridge: Silence PVS/V547: assuming stopped may be changed via ptr 2018-04-22 20:21:55 +03:00
ZyX
6c2b442ee0 eval/typval: Silence PVS/V576: format is correct 2018-04-22 20:20:53 +03:00
ZyX
f50670aeff ugrid: Silence PVS/V625: UGRID_FOREACH_CELL may be used for one row 2018-04-22 20:18:29 +03:00
ZyX
f9b728e2f8 tui: Silence PVS/V560: condition is set to true in prev-previous if() 2018-04-22 20:16:58 +03:00
ZyX
9da2e7b021 syntax: Fix PVS/V560: condition was checked in previous if(), breaking 2018-04-22 20:15:42 +03:00
ZyX
3f4ec1aed2 syntax: Fix PVS/V547: condition was checked
In surrounding if() `off` was checked for being non-zero and in previous if() it
was checked for being positive.
2018-04-22 20:15:42 +03:00