On Tue, Jul 19, 2016 at 12:12:25PM +0200, Jean-Marc Lasgouttes wrote: > Le 19/07/2016 à 08:17, Scott Kostyshak a écrit : > > > The status checking in this commit ignores that buffer-zoom-out can zoom > > in and that buffer-zoom-in can zoom out (in fact our implementation of > > zooming with the scroll wheel only uses buffer-zoom-in). They both > > accept positive and negative arguments, it is just that their defaults > > are different. I found this behavior unintuitive and attempted to > > clarify the documentation at 3826ff64. > > Yes, I saw that but was lazy :) > > > The attached patch provides what I think is correct status checking. OK > > to go in? > > I think this is wrong: > + bool const neg_zoom = > + convert<int>(cmd.argument()) < 0 || > + (cmd.action() == LFUN_BUFFER_ZOOM_OUT && > cmd.argument().empty()); > + if (lyxrc.zoom <= 10 && neg_zoom) { > flag.message(_("Zoom level cannot be less than 10%.")); > + enable = false; > > You have to do the whole thing: compute the offset using the formula in > dispatch(), and then check that zoom+offset>=10.
It is not clear to me that we want to do that. If the current zoom is 15, and the user does buffer-zoom-out Do we want it to be disabled? Or do we want to enable it but just change the zoom from 15 to 10? I prefer the second. Scott
signature.asc
Description: PGP signature