[PATCH] Help Viewer - mouse issues

Pavel Tsekov ptsekov at gmx.net
Sat Jan 6 11:20:26 UTC 2007


On Wed, 2007-01-03 at 23:03, Pavel Tsekov wrote:
> On Wed, 2007-01-03 at 22:43, Grigory Trenin wrote:
> > 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 ();
> 
> Yep.
> 
> > 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...
> 
> I don't like it either :) But I'd like to hear from the other
> people on this list, if possible, before doing anything.

If anyone has something to add to this issue it's about time.
Otherwise I'll move to fixing this issue one way or the other.





More information about the mc-devel mailing list