Re: [PATCH] Help Viewer - mouse issues
- From: Grigory Trenin <gtrenin gmail com>
- To: Pavel Tsekov <ptsekov gmx net>
- Cc: mc-devel gnome org
- Subject: Re: [PATCH] Help Viewer - mouse issues
- Date: Wed, 03 Jan 2007 23:43:08 +0300
Pavel Tsekov wrote:
How about fixing help_follow_link() instead ? IMO, this
would be a proper fix if we agree that the leading '\n'
is not desired.
Good point!
Certainly, this would be better.
The help format documentation says:
"The hypertext file is a file that may have one or more nodes.
Each node ends with a ^D character and starts with a bracket,
then the name of the node and then a closing bracket."
I don't see anything about the newline being part of the
node header and that it needs to be stripped. However,
as you noted above if the keyboard is used to follow a link
the newline is stripped. So, IMO, either the documentation
is buggy and we have to fix it and fix help_follow_link()
too or the key handling code is wrong to assume that it
has to move beyond the newline. Any thoughts ?
It is man2hlp.c who always puts newline after the node header:
fprintf (f_out, "\004[Contents]\n");
...
fprintf (f_out, "%c[%s]", CHAR_NODE_END, buffer);
col++;
newline ();
Besides, newlines are also present in the "template" - xnc.hlp file.
It is interesting, however, that move_backward2(), which
is called when the <up> key is pressed, assumes '\n' as a part
of the node header, but move_to_top(), which is called when
the <home> key is pressed - doesn't.
As for me, I don't like that leading '\n', but it is probably
a matter of taste. IMHO it is better to fix help_follow_link(),
move_to_top(), and documentation...
But I remember (it was 2 months ago, I guess) you suggested
to rip line wrapping code out of man2hlp and to put it in the
Help Viewer... If you still plan to do it, may be it would be better
to patch man2hlp.c also not to insert '\n' after the node header...
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]