* user.c (expand_format): Return % with followed character if it
without special meaning.
Этот коммит содержится в:
родитель
d3204db4e0
Коммит
f7cacb883f
@ -1,3 +1,8 @@
|
|||||||
|
2004-11-12 Pavel Shirshov <me@pavelsh.pp.ru>
|
||||||
|
|
||||||
|
* user.c (expand_format): Return % with followed character if it
|
||||||
|
without special meaning.
|
||||||
|
|
||||||
2004-11-11 Roland Illig <roland.illig@gmx.de>
|
2004-11-11 Roland Illig <roland.illig@gmx.de>
|
||||||
|
|
||||||
* popthelp.c (showHelpIntro): The basename of argv[0] starts after
|
* popthelp.c (showHelpIntro): The basename of argv[0] starts after
|
||||||
|
14
src/user.c
14
src/user.c
@ -173,6 +173,8 @@ expand_format (struct WEdit *edit_widget, char c, int quote)
|
|||||||
WPanel *panel;
|
WPanel *panel;
|
||||||
char *(*quote_func) (const char *, int);
|
char *(*quote_func) (const char *, int);
|
||||||
char *fname;
|
char *fname;
|
||||||
|
char *result;
|
||||||
|
char c_lc;
|
||||||
|
|
||||||
if (c == '%')
|
if (c == '%')
|
||||||
return g_strdup ("%");
|
return g_strdup ("%");
|
||||||
@ -192,10 +194,10 @@ expand_format (struct WEdit *edit_widget, char c, int quote)
|
|||||||
else
|
else
|
||||||
quote_func = fake_name_quote;
|
quote_func = fake_name_quote;
|
||||||
|
|
||||||
c = tolower (c);
|
c_lc = tolower (c);
|
||||||
fname = panel->dir.list[panel->selected].fname;
|
fname = panel->dir.list[panel->selected].fname;
|
||||||
|
|
||||||
switch (c) {
|
switch (c_lc) {
|
||||||
case 'f':
|
case 'f':
|
||||||
case 'p':
|
case 'p':
|
||||||
return (*quote_func) (fname, 0);
|
return (*quote_func) (fname, 0);
|
||||||
@ -218,7 +220,7 @@ expand_format (struct WEdit *edit_widget, char c, int quote)
|
|||||||
fname = (*quote_func) (file, 0);
|
fname = (*quote_func) (file, 0);
|
||||||
g_free (file);
|
g_free (file);
|
||||||
return fname;
|
return fname;
|
||||||
} else if (c == 'b') {
|
} else if (c_lc == 'b') {
|
||||||
return strip_ext ((*quote_func) (fname, 0));
|
return strip_ext ((*quote_func) (fname, 0));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -255,13 +257,15 @@ expand_format (struct WEdit *edit_widget, char c, int quote)
|
|||||||
(*quote_func) (panel->dir.list[i].fname, 0));
|
(*quote_func) (panel->dir.list[i].fname, 0));
|
||||||
g_free (tmp);
|
g_free (tmp);
|
||||||
strcat (block, " ");
|
strcat (block, " ");
|
||||||
if (c == 'u')
|
if (c_lc == 'u')
|
||||||
do_file_mark (panel, i, 0);
|
do_file_mark (panel, i, 0);
|
||||||
}
|
}
|
||||||
return block;
|
return block;
|
||||||
} /* sub case block */
|
} /* sub case block */
|
||||||
} /* switch */
|
} /* switch */
|
||||||
return g_strdup ("%");
|
result = g_strdup ("% ");
|
||||||
|
result[1] = c;
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user