>>>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)) ? >>> >> >> I'd guess that for LyXFunc.cpp, we only need to change one line in >> dispatch and one in getStatus, because in principle all LFUNs that are >> handled there are about the document buffer. >> >> And maybe only in the Text class we need to have access to the >> embedded buffer if any. >> >if i'm in find window and try to eg. vcs checkout then what? >if we disable it in getstatus we cant use vcs for main document?
Vcs checkout is handled in LyXFunc, so that will be the main/document buffer by default. I think that should hold for all LFUNs handled in LyXFunc. That means we only have to replace "buf = lyx_view_->buffer()" with "buf = lyx_view_->mainBuffer()" once in LyXFunc.cpp. The difficulty comes in for LFUN_BUFFER_EXPORT. How do we know whether to dispatch this to buffer() or mainBuffer() ? That'd be a reason to not handle it in Buffer. >pavel Vincent