Am 24.06.2013 um 08:34 schrieb Scott Kostyshak <skost...@lyx.org>: > 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.
Ooops… You're right, of course. Thank you. I've made another attempt to do it right. This implements the mac-like behavior when being at the first/last line of the document. I tried to find an application with the concept of an inset and couldn't find any. So I decided to leave the behavior for inset boundaries untouched. Stephan
0003-LFUN_DOWN-if-cursor-is-on-last-line-move-to-end.patch
Description: Binary data