Help for the quick translucency shortcuts. Fix a bug in Help where a hotkey highlight was on wrong position if an escaped character preceded it (The case never occured in 2.0)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@866 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
14
help.c
14
help.c
@@ -278,7 +278,21 @@ void Display_help(void)
|
||||
else if (line_type == 'K')
|
||||
{
|
||||
const char *hyperlink;
|
||||
const char * escaped_percent_pos;
|
||||
// Determine link position:
|
||||
link_position = strstr(line,"%s") - line;
|
||||
// Adjust for any escaped %% that would precede it.
|
||||
escaped_percent_pos = line;
|
||||
do
|
||||
{
|
||||
escaped_percent_pos = strstr(escaped_percent_pos,"%%");
|
||||
if (escaped_percent_pos && escaped_percent_pos - line < link_position)
|
||||
{
|
||||
link_position--;
|
||||
escaped_percent_pos+=2;
|
||||
}
|
||||
} while (escaped_percent_pos);
|
||||
//
|
||||
hyperlink=Keyboard_shortcut_value(Help_section[Current_help_section].Help_table[start_line + line_index].Line_parameter);
|
||||
link_size=strlen(hyperlink);
|
||||
snprintf(buffer, 44, line, hyperlink);
|
||||
|
||||
Reference in New Issue
Block a user