b-r-o-c-k
cffdc1da02
ci/AppVeyor: Remove Git Unix utilities from the PATH
2018-03-26 10:54:44 -05:00
b-r-o-c-k
ab6051331c
build/msvc: Fix check for cksum on Windows
2018-03-26 10:54:44 -05:00
b-r-o-c-k
afe6b4881f
build/msvc: Add workaround for false positive exit code from MSBuild
...
See https://cmake.org/pipermail/cmake-developers/2015-October/026775.html
2018-03-26 10:54:44 -05:00
b-r-o-c-k
afd46b78c5
build/msvc: Fix libvterm patch
2018-03-26 10:54:44 -05:00
Justin M. Keyes
a9c94f7bb0
Merge #7881 from ZyX-I/fix-7876
2018-03-25 19:13:45 +02:00
KunMing Xie
ce5c2030bf
vim-patch:8.0.0417: test for the clipboard fails sometimes ( #8174 )
...
Problem: Test for the clipboard fails sometimes.
Solution: Add it to the flaky tests.
0fbff646d5
2018-03-25 17:20:59 +02:00
Vadim A. Misbakh-Soloviov
9ebe2ad331
runtime/dircolors.vim: support termguicolors ( #8175 )
2018-03-25 15:45:02 +02:00
ZyX
201a4ef11c
*: Replace did_throw checks with current_exception checks
...
Removes obsolete did_throw after that.
2018-03-25 15:13:05 +03:00
ZyX
79b4b6fc86
*: Make sure that !did_throw implies !current_exception
...
Fixes #7876
2018-03-25 14:50:48 +03:00
Justin M. Keyes
f8d2aef4f2
vim-patch.sh: remove blank line before URL
...
This "stacks" better in squashed PRs, etc.
2018-03-24 23:08:40 +01:00
Justin M. Keyes
5fecd59c26
Merge #8167 , #7943
2018-03-24 23:06:36 +01:00
Nimit Bhardwaj
8d64a2fb1d
test: lua test for vim-patch:8.0.0184
...
2b7bc567b9
2018-03-24 23:06:09 +01:00
Justin M. Keyes
29395fd304
vim-patches: test_system.vim
...
vim-patch:8.0.0185: system() test fails on MS-Windows
vim-patch:8.0.0197: system() test skips some parts for MS-Windows
vim-patch:8.0.0701: system test failing when using X11 forwarding
2018-03-24 23:06:09 +01:00
sohnryang
f50ce7d510
vim-patch:8.0.0184: fix ex-mode exit code #7943
...
Problem: When in Ex mode and an error is caught by try-catch, Vim still
exits with a non-zero exit code.
Solution: Don't set ex_exitval when inside a try-catch. (partly by Christian
Brabandt)
2b7bc567b9
2018-03-24 22:33:41 +01:00
Jan Edmund Lazo
131aad953c
win: defaults: 'shellcmdflag', 'shellxquote' #7343
...
closes #7698
Wrapping a command in double-quotes allows cmd.exe to safely dequote the
entire command as if the user entered the entire command in an
interactive prompt. This reduces the need to escape nested and uneven
double quotes.
The `/s` flag of cmd.exe makes the behaviour more reliable:
:set shellcmdflag=/s\ /c
Before this patch, cmd.exe cannot use cygwin echo.exe (as opposed to
cmd.exe `echo` builtin) even if it is wrapped in double quotes.
Example:
:: internal echo
> cmd /s /c " echo foo\:bar" "
foo\:bar"
:: cygwin echo.exe
> cmd /s /c " "echo" foo\:bar" "
foo:bar
2018-03-24 22:05:53 +01:00
b-r-o-c-k
be67d926c5
build/msvc: Add libintl to bundled dependencies ( #8163 )
2018-03-24 17:58:32 +01:00
Justin M. Keyes
6a7c904648
Merge #4419 'implement <Cmd> key'
2018-03-24 17:45:48 +01:00
Justin M. Keyes
1b61167373
Merge #8168 'refactor: rename some functions'
2018-03-24 16:07:11 +01:00
Justin M. Keyes
0ecf7e3a2d
refactor/rename: path_to_absolute()
2018-03-24 14:17:40 +01:00
Justin M. Keyes
7ae4144208
refactor/rename: path_try_shorten_fname()
2018-03-24 14:17:40 +01:00
Justin M. Keyes
998a16c926
refactor/rename: path_is_absolute()
2018-03-24 14:17:40 +01:00
Justin M. Keyes
84a25770ac
Merge #8165 'provider/RPC: fix double-free'
2018-03-24 14:03:16 +01:00
Justin M. Keyes
82cd0be2ea
refactor: eliminate autocmd_fname_full global
...
It's a micro-optimization; check path_is_absolute_path(autocmd_fname)
instead.
The main optimization (which is still in place) afforded by Vim 7.2.021
was to avoid resolving <afile> when it is not needed.
2018-03-24 12:16:39 +01:00
Justin M. Keyes
189c5abeba
provider/RPC: apply_autocmds_group(): fix double-free
...
During provider dispatch, eval_call_provider() saves global
state--including pointers, such as `autocmd_fname`--into
`provider_caller_scope` which is later restored by f_rpcrequest().
But `autocmd_fname` is special-cased in eval_vars(), for performance
(see Vim patch 7.2.021; this is also the singular purpose of the
`autocmd_fname_full` global. Yay!)
If eval_vars() frees `autocmd_fname` then its provider-RPC-scoped alias
becomes a problem.
Solution: Don't free autocmd_fname in eval_vars(), just copy into it.
closes #5245
closes #5617
Reference
------------------------------------------------------------------------
Vim patch 7.2.021
f6dad43c98
Problem: When executing autocommands getting the full file name may be
slow. (David Kotchan)
Solution: Postpone calling FullName_save() until autocmd_fname is used.
vim_dev discussion (2008): "Problem with CursorMoved AutoCommand when
Editing Files on a Remote WIndows Share"
https://groups.google.com/d/msg/vim_dev/kj95weZa_eE/GTgj4aq5sIgJ
2018-03-24 11:01:24 +01:00
Björn Linse
d407a48665
getchar: implement <Cmd> key to invoke command in any mode
2018-03-23 14:01:49 +01:00
KunMing Xie
9627325684
vim-patch:8.0.0387: compiler warnings ( #8162 )
...
Problem: compiler warnings
Solution: Add type casts. (Christian Brabandt)
b113c3a618
2018-03-23 07:59:08 +01:00
KunMing Xie
ce3bc12e25
vim-patch:8.0.0357: crash when setting 'guicursor' to weird value ( #8161 )
...
Problem: Crash when setting 'guicursor' to weird value.
Solution: Avoid negative size. (Dominique Pelle, closes vim/vim#1465 )
24922ec233
2018-03-22 07:34:42 +01:00
Justin M. Keyes
535bf89597
Merge #8147 'Run old tests in :terminal'
2018-03-21 00:26:39 +01:00
ZyX
519ff2ad42
oldtests: Make test output least verbose
...
Also removes `-` before `rm -rf` as `-f` is supposed to already suppress error.
2018-03-21 00:54:32 +03:00
Justin M. Keyes
10008f7d49
build/cmake: avoid CMP0054 ( #8149 )
...
CMP0054: Only interpret if() arguments as variables or keywords when unquoted.
2018-03-20 22:19:07 +01:00
Justin M. Keyes
739fb93a90
Merge #8128 'build/windows: Simplify build requirements'
2018-03-18 23:46:12 +01:00
Justin M. Keyes
1fb44676cd
build: avoid CMP0046 "dependency target does not exist" #8128
2018-03-18 23:41:48 +01:00
ZyX
1c0a2a39b6
oldtests: Run old tests in :terminal
...
Reasoning:
- No need to check for terminal size.
- No need to mess with terminal title.
- Allows old tests to timeout with the rest of the build proceeding.
- Less and less messy output to travis log.
- Opens a path allowing old tests run in parallel. Though last bit needs test
refactoring.
2018-03-18 23:51:43 +03:00
Justin M. Keyes
3bf57c1171
log/channels: Formatting. Also log loopback channel. #8146
2018-03-18 21:15:41 +01:00
b-r-o-c-k
c49dac7cd3
build: Fix CMake target dependency problem
...
nvim was being ran before its runtime dependencies were copied.
2018-03-18 12:51:39 -05:00
b-r-o-c-k
feee814b30
build/windows: Add CMakeLists.txt for gperf
2018-03-18 12:51:39 -05:00
b-r-o-c-k
229604213e
build/windows: Add CMake script to generate headers for Libvterm
...
On Windows the CMake script will replace the Perl script used by
Libvterm to generate headers.
2018-03-18 12:51:30 -05:00
b-r-o-c-k
15c53a44d3
build/windows: Add CMakeLists.txt for Libuv on Windows
...
Adding a CMakeLists.txt for Libuv removes the need for Python
when building on Windows.
2018-03-18 12:50:39 -05:00
b-r-o-c-k
bf789b04f3
build/windows: Ignore whitespace when applying patches
...
The --ignore-whitespace argument was added when applying patches to
prevent failures when patched files have different line endings.
2018-03-18 12:50:39 -05:00
Justin M. Keyes
4e02f1ab87
Merge #8107 'jobs: separate process-group'
2018-03-18 18:36:02 +01:00
Matthieu Coudron
0848add488
screen.c: define column width by function ( #5802 )
...
This does not change the behavior but centralizes column size for future use
(like dynamic signcolumn width depending on the maximum number of signs on a line).
The returned value is limited by the size of the `extra` tab in win_line
(currently allows for 18 ASCII characters).
2018-03-18 17:31:28 +01:00
Justin M. Keyes
ae409b5042
test/win: use cmd.exe for test
...
Can revert this after #8120 .
2018-03-18 17:15:06 +01:00
Justin M. Keyes
167898a517
test: jobstop() kills entire process tree
...
Test correctly fails before 8d90171f8b .
ref #6530
2018-03-18 17:03:05 +01:00
Justin M. Keyes
72e4c9d8e7
Merge #8142 'build/msvc: fix some warnings'
2018-03-18 16:47:25 +01:00
Justin M. Keyes
65b66bc332
build/MSVC: fix "C4005: RGB: macro redefinition"
2018-03-18 14:30:05 +01:00
Justin M. Keyes
26b84a8b3e
build/MSVC: fix "C4003: not enough actual parameters for macro"
...
For the case of TV_DICTITEM_STRUCT, we can't just pass `1` because:
https://github.com/neovim/neovim/pull/8142#discussion_r175262436
> this variant will trigger array overrun warnings from various static analyzers.
2018-03-18 14:30:05 +01:00
Justin M. Keyes
960f093625
build/MSVC: fix "C4028: formal parameter different from declaration"
2018-03-18 14:11:39 +01:00
Justin M. Keyes
66a8b593e7
ci/travis: report cache size
2018-03-18 14:11:39 +01:00
Justin M. Keyes
8f82f95c1c
ci/travis: also cache $DEPS_DOWNLOAD_DIR
...
ref #5166
2018-03-18 14:11:38 +01:00
Justin M. Keyes
a034d4b69d
API: nvim_get_proc()
...
TODO: "exepath" field (win32: QueryFullProcessImageName())
On unix-likes `ps` is used because the platform-specific APIs are
a nightmare. For reference, below is a (incomplete) attempt:
diff --git a/src/nvim/os/process.c b/src/nvim/os/process.c
index 09769925aca5..99afbbf290c1 100644
--- a/src/nvim/os/process.c
+++ b/src/nvim/os/process.c
@@ -208,3 +210,60 @@ int os_proc_children(int ppid, int **proc_list, size_t *proc_count)
return 0;
}
+/// Gets various properties of the process identified by `pid`.
+///
+/// @param pid Process to inspect.
+/// @return Map of process properties, empty on error.
+Dictionary os_proc_info(int pid)
+{
+ Dictionary pinfo = ARRAY_DICT_INIT;
+#ifdef WIN32
+
+#elif defined(__APPLE__)
+ char buf[PROC_PIDPATHINFO_MAXSIZE];
+ if (proc_pidpath(pid, buf, sizeof(buf))) {
+ name = getName(buf);
+ PUT(pinfo, "exepath", STRING_OBJ(cstr_to_string(buf)));
+ return name;
+ } else {
+ ILOG("proc_pidpath() failed for pid: %d", pid);
+ }
+#elif defined(BSD)
+# if defined(__FreeBSD__)
+# define KP_COMM(o) o.ki_comm
+# else
+# define KP_COMM(o) o.p_comm
+# endif
+ struct kinfo_proc *proc = kinfo_getproc(pid);
+ if (proc) {
+ PUT(pinfo, "name", cstr_to_string(KP_COMM(proc)));
+ xfree(proc);
+ } else {
+ ILOG("kinfo_getproc() failed for pid: %d", pid);
+ }
+
+#elif defined(__linux__)
+ char fname[256] = { 0 };
+ char buf[MAXPATHL];
+ snprintf(fname, sizeof(fname), "/proc/%d/comm", pid);
+ FILE *fp = fopen(fname, "r");
+ // FileDescriptor *f = file_open_new(&error, fname, kFileReadOnly, 0);
+ // ptrdiff_t file_read(FileDescriptor *const fp, char *const ret_buf,
+ // const size_t size)
+ if (fp == NULL) {
+ ILOG("fopen() of /proc/%d/comm failed", pid);
+ } else {
+ size_t n = fread(buf, sizeof(char), sizeof(buf) - 1, fp);
+ if (n == 0) {
+ WLOG("fread() of /proc/%d/comm failed", pid);
+ } else {
+ size_t end = MIN(sizeof(buf) - 1, n);
+ end = (end > 0 && buf[end - 1] == '\n') ? end - 1 : end;
+ buf[end] = '\0';
+ PUT(pinfo, "name", STRING_OBJ(cstr_to_string(buf)));
+ }
+ }
+ fclose(fp);
+#endif
+ return pinfo;
+}
2018-03-18 00:11:45 +01:00