mirror of
https://github.com/weechat/weechat.git
synced 2026-06-29 09:45:41 +02:00
script: add diff between current script and version in repository
New options: - script.look.diff_command - script.look.diff_color Key alt-d has been changed to alt-v on script buffer (view script). Key alt-d is now used on detail of script to jump to diff (if diff is displayed).
This commit is contained in:
@@ -36,7 +36,8 @@
|
||||
struct t_gui_buffer *script_buffer = NULL;
|
||||
int script_buffer_selected_line = 0;
|
||||
struct t_repo_script *script_buffer_detail_script = NULL;
|
||||
int script_buffer_detail_script_line_source = 0;
|
||||
int script_buffer_detail_script_last_line = 0;
|
||||
int script_buffer_detail_script_line_diff = -1;
|
||||
|
||||
|
||||
/*
|
||||
@@ -475,7 +476,8 @@ script_buffer_display_detail_script (struct t_repo_script *script)
|
||||
(script->max_weechat) ? script->max_weechat : "-");
|
||||
line++;
|
||||
|
||||
script_buffer_detail_script_line_source = line + 2;
|
||||
script_buffer_detail_script_last_line = line + 2;
|
||||
script_buffer_detail_script_line_diff = -1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -502,14 +504,14 @@ script_buffer_refresh (int clear)
|
||||
{
|
||||
snprintf (str_title, sizeof (str_title),
|
||||
"%s",
|
||||
_("alt+d=back to list"));
|
||||
_("Alt+key/input: v=back to list d=jump to diff"));
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf (str_title, sizeof (str_title),
|
||||
_("%d/%d scripts (filter: %s) | Sort: %s | "
|
||||
"Alt+key/input: i=install r=remove l=load L=reload "
|
||||
"u=unload h=(un)hold d=show detail | Input: q=close "
|
||||
"u=unload h=(un)hold v=view script | Input: q=close "
|
||||
"$=refresh s:x,y=sort words=filter *=reset filter | "
|
||||
"Mouse: left=select right=install/remove"),
|
||||
script_repo_count_displayed,
|
||||
@@ -704,14 +706,15 @@ int
|
||||
script_buffer_input_cb (void *data, struct t_gui_buffer *buffer,
|
||||
const char *input_data)
|
||||
{
|
||||
char *actions[][2] = { { "l", "load" },
|
||||
{ "u", "unload" },
|
||||
{ "L", "reload" },
|
||||
{ "i", "install" },
|
||||
{ "r", "remove" },
|
||||
{ "h", "hold" },
|
||||
{ "d", "show" },
|
||||
{ NULL, NULL } };
|
||||
char *actions[][2] = { { "l", "load" },
|
||||
{ "u", "unload" },
|
||||
{ "L", "reload" },
|
||||
{ "i", "install" },
|
||||
{ "r", "remove" },
|
||||
{ "h", "hold" },
|
||||
{ "v", "show" },
|
||||
{ "d", "showdiff" },
|
||||
{ NULL, NULL } };
|
||||
char str_command[64];
|
||||
int i;
|
||||
|
||||
@@ -811,14 +814,15 @@ script_buffer_set_callbacks ()
|
||||
void
|
||||
script_buffer_set_keys ()
|
||||
{
|
||||
char *keys[][2] = { { "meta-l", "load" },
|
||||
{ "meta-u", "unload" },
|
||||
{ "meta-L", "reload" },
|
||||
{ "meta-i", "install" },
|
||||
{ "meta-r", "remove" },
|
||||
{ "meta-h", "hold" },
|
||||
{ "meta-d", "show" },
|
||||
{ NULL, NULL } };
|
||||
char *keys[][2] = { { "meta-l", "load" },
|
||||
{ "meta-u", "unload" },
|
||||
{ "meta-L", "reload" },
|
||||
{ "meta-i", "install" },
|
||||
{ "meta-r", "remove" },
|
||||
{ "meta-h", "hold" },
|
||||
{ "meta-v", "show" },
|
||||
{ "meta-d", "showdiff" },
|
||||
{ NULL, NULL } };
|
||||
char str_key[64], str_command[64];
|
||||
int i;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user