mirror of
https://github.com/vim/vim.git
synced 2025-10-20 08:14:18 -04:00
patch 9.1.1863: Cannot test for working "+" register
Problem: Cannot test for working "+" register Solution: Add a few more feature tests (Foxe Chen) closes: #18541 Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
18d57a1b4c
commit
f22cedd75f
@@ -3573,7 +3573,6 @@ get_clipmethod(char_u *str, bool *plus UNUSED, bool *star)
|
||||
#endif
|
||||
*star = star_avail == 1;
|
||||
}
|
||||
|
||||
else if (
|
||||
#ifndef ONE_CLIPBOARD
|
||||
plus_avail == -1 ||
|
||||
@@ -3585,7 +3584,6 @@ get_clipmethod(char_u *str, bool *plus UNUSED, bool *star)
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
||||
// Keep on going in order to catch errors
|
||||
if (method != CLIPMETHOD_NONE && ret == CLIPMETHOD_FAIL)
|
||||
ret = method;
|
||||
|
@@ -7929,8 +7929,22 @@ f_has(typval_T *argvars, typval_T *rettv)
|
||||
else if (STRICMP(name, "clipboard_working") == 0)
|
||||
{
|
||||
x = TRUE;
|
||||
#ifdef FEAT_CLIPBOARD
|
||||
n = clip_star.available || clip_plus.available;
|
||||
#endif
|
||||
}
|
||||
else if (STRICMP(name, "clipboard_star_avail") == 0)
|
||||
{
|
||||
x = TRUE;
|
||||
#ifdef FEAT_CLIPBOARD
|
||||
n = clip_star.available;
|
||||
#endif
|
||||
}
|
||||
else if (STRICMP(name, "clipboard_plus_avail") == 0)
|
||||
{
|
||||
x = TRUE;
|
||||
#ifdef FEAT_CLIPBOARD
|
||||
n = clip_plus.available && &clip_star != &clip_plus;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@@ -727,4 +727,48 @@ func Test_eval_string_in_special_key()
|
||||
silent! echo 0{1-$"\<S--{>n|nö% |