lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev patch - search in partial mode (part1)


From: Klaus Weide
Subject: Re: lynx-dev patch - search in partial mode (part1)
Date: Wed, 17 Nov 1999 12:11:47 -0600 (CST)

On Sun, 7 Nov 1999, Leonid Pauzner wrote:

> Looking onto new modularizing mainloop I found out that LYK_WHEREIS search
> could be added for partial mode relatively easy.
> 
> 
> * reorganize the code: 'search_target' now became global, so display_page()
>   and highlight() could be called from any place easily. This was a mainloop
>   local variable (name changed from 'prev_target' to avoid conflict
>   elsewhere), the value currently changed in mainloop(), handle_LYK_WHEREIS()
>   and textsearch().

I don't like omitting the 'target' parameter from all the calls, for reasons
of modularity.  'target' is an important input to display_page() and
highlight() etc.  Omitting the parameter makes the dependency less obvious,
it hides it.  Making more and more parameters global variables isn't
generally a good direction.

You also lose flexibility - there *might* be reason why sometimes
display_page() or highlight() should be called without highlighting.

Could you look at this again?  I think you should be able to basically
keep 'prev_target' PRIVATE to LYMainLoop.c [but defined outside of
mainloop()].  Everything that needs to know it should call functions
in LYMainLoop.c or be called from there.

> * Add user search in partial mode (while loading of the document is in
>   progress). Scrolling to the string in question is not working properly
>   yet if you repeat 'n' next time. More work required.
>
> It is interesting enough that handle_LYK_WHEREIS() and textsearch() work
> more or less properly while they call '&curdoc' but we load 'newdoc' in
> fact. Therefor new line /link position is not saved as it should.

Hmm, so it works only more or less by accident...

> Some more play around handle_LYK_WHEREIS/www_search_result/Newline/etc.
> is required, but that would be a light weighted fine turning patch (or a
> couple).

Sounds like this will take a while to sort out.  (I have not tried it
yet.)

   Klaus


reply via email to

[Prev in Thread] Current Thread [Next in Thread]