On Fri, Jun 21, 2013 at 2:42 AM, Stephan Witt <st.w...@gmx.net> wrote:
> Am 20.06.2013 um 18:00 schrieb Jean-Marc Lasgouttes <lasgout...@lyx.org>:
>
>> 20/06/2013 16:37, Stephan Witt:
>>> Yes. Originally it was:
>>>
>>> if (!atFirstOrLastRow) {
>>>  do_something();
>>> }
>>>
>>> now it is:
>>>
>>> if (atFirstOrLastRow) {
>>>  if (lyxrc.mac_like_cursor_movement) {
>>>   scotts_doing();
>>>  }
>>>  // do nothing - Pavels preference
>>> } else {
>>>  do_something();
>>> }
>>>
>>> Ok?
>>
>> What would happen with
>>  if (atFirstOrLastRow && lyxrc.mac_like_cursor_movement)
>> ?
>
> That's possible - to avoid another nesting level - with:
>
> if (atFirstOrLastRow && lyxrc.mac_like_cursor_movement) {
>  scotts_doing(); // new behavior - mac like
> } else if (!atFirstOrLastRow) {
>  do_something(); // original "if" code
> }
>
> Looks good too.
>
> Stephan
>
>>
>> I ask because I do not really understand why the last else{} clause is 
>> removed.
>>
>> I should probably try it myself :)
>>
>> JMarc
>

The patch I posted was wrong. When in an inset, if you go up, you go
to the beginning of the buffer. Using LFUN_INSET_BEGIN_SELECT is more
reasonable, but is that what we want? Do we want this behavior only on
the first and last line of the buffer? LFUN_UP inside an inset should
not be changed from the current behavior. It's less clear for
LFUN_UP_SELECT inside an inset.

Scott

Reply via email to