Am 27.04.2012 um 19:10 schrieb Stephan Witt: > Am 27.04.2012 um 17:33 schrieb Ronen Abravanel: > >> And a patch that perform my suggestion is attachted. >> >> Ronen Abravanel >> >> >> >> On Fri, Apr 27, 2012 at 6:04 PM, Ronen Abravanel <ron...@gmail.com> wrote: >> It seems the change was done in order to fix: >> >> http://www.lyx.org/trac/ticket/7778 > > Yes. That's correct. > > Wouldn't it be easier for you to make it more smart with respect to the > current selection? > Like the attached patch? > > Stephan
This patch restores the font toggle feature if there is no selection. I looked into this and it is that way: Given one invokes the LFUN_LANGUAGE with a value different from current one at current position. Then the language is changed to the new value. If one passes the current one the language it is set (back) to the document or default language. E. g. one has document language english. The first call of "language hebrew" switches to hebrew. The next call of "language hebrew" switches back to english. Now I want to ask: is this a bug or a feature? The patch I've posted restores the old behavior. So it is not bad. But is it good? If nobody objects I'd like to commit that thing. IMHO, the alternative to check the selection state is to add an optional argument "toggle" to the LFUN_LANGUAGE. Stephan
refine-7778.patch
Description: Binary data