mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 9.1.0868: the warning about missing clipboard can be improved
Problem: the warning about missing clipboard can be improved (after v9.1.0852) Solution: use different warnings depending on whether or not clipboard support is included in Vim, update related documentation Improve the Warnings about missing clipboard registers - Make it translatable - Use a different warning, when clipboard support was not compiled in - add a reference to :h W24 - explain in more detail the error message closes: #16069 Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -56,7 +56,6 @@ static FILE *verbose_fd = NULL;
|
||||
static int verbose_did_open = FALSE;
|
||||
|
||||
static int did_warn_clipboard = FALSE;
|
||||
static char *warn_clipboard = "W23: Clipboard register not available, using register 0";
|
||||
|
||||
/*
|
||||
* When writing messages to the screen, there are many different situations.
|
||||
@@ -4071,7 +4070,11 @@ msg_warn_missing_clipboard(void)
|
||||
{
|
||||
if (!global_busy && !did_warn_clipboard)
|
||||
{
|
||||
msg(_(warn_clipboard));
|
||||
#ifdef FEAT_CLIPBOARD
|
||||
msg(_("W23: Clipboard register not available, using register 0"));
|
||||
#else
|
||||
msg(_("W24: Clipboard register not available. See :h W24"));
|
||||
#endif
|
||||
did_warn_clipboard = TRUE;
|
||||
}
|
||||
}
|
||||
|
@@ -1052,7 +1052,7 @@ func Test_clipboard_regs_not_working()
|
||||
new
|
||||
call append(0, "text for clipboard test")
|
||||
let mess = execute(':norm "*yiw')
|
||||
call assert_match('W23', mess)
|
||||
call assert_match('W24', mess)
|
||||
bw!
|
||||
endif
|
||||
endfunc
|
||||
|
@@ -704,6 +704,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
868,
|
||||
/**/
|
||||
867,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user