mirror of
https://github.com/neovim/neovim.git
synced 2025-09-04 02:18:15 +00:00
Compare commits
3 Commits
79bfeecdb4
...
f9ce939bf5
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f9ce939bf5 | ||
![]() |
1ae09bf545 | ||
![]() |
431004dda2 |
@@ -649,11 +649,11 @@ ask you where to write the file (there must be a writable directory in
|
||||
'runtimepath' for this).
|
||||
|
||||
The plugin has a default place where to look for spell files, on the Vim ftp
|
||||
server. The protocol used is SSL (https://) for security. If you want to use
|
||||
another location or another protocol, set the g:spellfile_URL variable to the
|
||||
directory that holds the spell files. You can use http:// or ftp://, but you
|
||||
are taking a security risk then. The |netrw| plugin is used for getting the
|
||||
file, look there for the specific syntax of the URL. Example: >
|
||||
server. The protocol used is TLS (`https://`) for security. If you want to
|
||||
use another location or another protocol, set the g:spellfile_URL variable to
|
||||
the directory that holds the spell files. You can use `http://` or `ftp://`,
|
||||
but you are taking a security risk then. The |netrw| plugin is used for
|
||||
getting the file, look there for the specific syntax of the URL. Example: >
|
||||
let g:spellfile_URL = 'https://ftp.nluug.nl/vim/runtime/spell'
|
||||
You may need to escape special characters.
|
||||
|
||||
|
@@ -136,10 +136,10 @@ might want to try the manual way of downloading the file.
|
||||
Accessing files over the internet works with the netrw plugin. Currently URLs
|
||||
with these formats are recognized:
|
||||
|
||||
ftp:// uses ftp
|
||||
rcp:// uses rcp
|
||||
scp:// uses scp
|
||||
http:// uses wget (reading only)
|
||||
`ftp://` uses ftp
|
||||
`rcp://` uses rcp
|
||||
`scp://` uses scp
|
||||
`http://` uses wget (reading only)
|
||||
|
||||
Vim doesn't do the communication itself, it relies on the mentioned programs
|
||||
to be available on your computer. On most Unix systems "ftp" and "rcp" will
|
||||
@@ -147,7 +147,7 @@ be present. "scp" and "wget" might need to be installed.
|
||||
|
||||
Vim detects these URLs for each command that starts editing a new file, also
|
||||
with ":edit" and ":split", for example. Write commands also work, except for
|
||||
http://.
|
||||
`http://`.
|
||||
|
||||
For more information, also about passwords, see |netrw|.
|
||||
|
||||
|
@@ -188,6 +188,7 @@ static bool event_teardown(void)
|
||||
/// Needed for unit tests.
|
||||
void early_init(mparm_T *paramp)
|
||||
{
|
||||
os_hint_priority();
|
||||
estack_init();
|
||||
cmdline_init();
|
||||
eval_init(); // init global variables
|
||||
|
@@ -39,6 +39,10 @@
|
||||
# include "nvim/fileio.h"
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
# include <mach/task.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE__NSGETENVIRON
|
||||
# include <crt_externs.h>
|
||||
#endif
|
||||
@@ -367,6 +371,18 @@ int64_t os_get_pid(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
/// Signals to the OS that Nvim is an application for "interactive work"
|
||||
/// which should be prioritized similar to a GUI app.
|
||||
void os_hint_priority(void)
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
// By default, processes have the TASK_UNSPECIFIED "role", which means all of its threads are
|
||||
// clamped to Default QoS. Setting the role to TASK_DEFAULT_APPLICATION removes this clamp.
|
||||
integer_t policy = TASK_DEFAULT_APPLICATION;
|
||||
task_policy_set(mach_task_self(), TASK_CATEGORY_POLICY, &policy, 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// Gets the hostname of the current machine.
|
||||
///
|
||||
/// @param hostname Buffer to store the hostname.
|
||||
|
@@ -335,7 +335,8 @@ ScreenGrid *ui_comp_get_grid_at_coord(int row, int col)
|
||||
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
|
||||
ScreenGrid *grid = &wp->w_grid_alloc;
|
||||
if (row >= grid->comp_row && row < grid->comp_row + grid->rows
|
||||
&& col >= grid->comp_col && col < grid->comp_col + grid->cols) {
|
||||
&& col >= grid->comp_col && col < grid->comp_col + grid->cols
|
||||
&& !wp->w_config.hide) {
|
||||
return grid;
|
||||
}
|
||||
}
|
||||
|
@@ -76,7 +76,39 @@ describe('screenchar() and family respect floating windows', function()
|
||||
describe('with ext_multigrid', function()
|
||||
with_ext_multigrid(true)
|
||||
end)
|
||||
|
||||
describe('without ext_multigrid', function()
|
||||
with_ext_multigrid(false)
|
||||
end)
|
||||
|
||||
describe('hidden windows', function()
|
||||
before_each(function()
|
||||
clear()
|
||||
Screen.new(40, 7, {})
|
||||
api.nvim_buf_set_lines(0, 0, -1, true, { 'aaa', 'aaa' })
|
||||
end)
|
||||
|
||||
local assert_screen_funcs = function()
|
||||
eq('a', fn.screenstring(1, 1))
|
||||
eq(97, fn.screenchar(1, 1))
|
||||
eq({ 97 }, fn.screenchars(1, 1))
|
||||
eq(fn.screenattr(2, 1), fn.screenattr(1, 1))
|
||||
end
|
||||
|
||||
it('manual', function()
|
||||
local bufnr = api.nvim_create_buf(false, true)
|
||||
api.nvim_buf_set_lines(bufnr, 0, -1, true, { 'bb' })
|
||||
local win_opts = { relative = 'editor', row = 0, col = 0, height = 1, width = 2, hide = true }
|
||||
api.nvim_open_win(bufnr, false, win_opts)
|
||||
|
||||
assert_screen_funcs()
|
||||
end)
|
||||
|
||||
it('from ui2', function()
|
||||
n.exec_lua('require("vim._extui").enable({ enable = true })')
|
||||
command('echo "foo"')
|
||||
|
||||
assert_screen_funcs()
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user