Pavel Sanda ha scritto:
Tommaso Cucinotta wrote:
While on the GUI side this distinction used to exist through the GuiView::currentWorkarea() vs GuiView::currentMainWorkArea() methods, on the model side (LFUN implementation, i.e., from inside LyXFunc.cpp), currently only the selected WA's buffer was visible, through the LyXView::buffer() method. With this patch, we can retrieve the main document buffer as well, through the LyXView::mainBuffer() method.

hmm, wouldnt be better to let buffer() for the document only and add
rather different function for lyx find usage (or buffer(with some params)) ?

we use buffer() on zillion places and i dont want even think what should happen
once they return search area buffer for subsequent processing...
I know of this alternative. It's just a matter of how many places require the document buffer, as compared to how many ones operate on the selected buffer. As of now, given that the editing actions were expected to be far more than the other types of action (I could think of, with my little knowledge of LyX :-), i.e., open, save, preview -- compare with the LFUNs that allow to edit contents), then it was decided to change the buffer() behaviour. Currently, this already happens in trunk.

However, I understand your point and it could be more clear the other way round. In principle, I would let Abdel also give his opinion on this, as he accepted/reworked this patch on the first place.

   T.


Reply via email to