Re: Bug 3062 AGAIN! (Re: [PATCH] bug 3062 and getStatus cleanup)

2007-01-22 Thread Jean-Marc Lasgouttes
> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes: Bo> Your solution may be wrong because C-< should not work without Bo> buffer, but 'bookmark-goto 1/2/3' etc should work without buffer. Bo> This is why I moved 'bookmark-goto' from BufferView to lfunc. Since we now know that bookmark 0 is valid w

Re: Bug 3062 AGAIN! (Re: [PATCH] bug 3062 and getStatus cleanup)

2007-01-12 Thread Jean-Marc Lasgouttes
> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes: >> Are you sure that C-< should not work without buffer? Why? Bo> I am actually not sure. Bookmark 0 is not saved with session so it Bo> does not exist when lyx starts (reason for C-< crash). If bookmark Bo> 0 becomes valid later, it should be usab

Re: Bug 3062 AGAIN! (Re: [PATCH] bug 3062 and getStatus cleanup)

2007-01-12 Thread Bo Peng
Are you sure that C-< should not work without buffer? Why? I am actually not sure. Bookmark 0 is not saved with session so it does not exist when lyx starts (reason for C-< crash). If bookmark 0 becomes valid later, it should be usable without a valid buffer. I am not sure because I never use b

Re: Bug 3062 AGAIN! (Re: [PATCH] bug 3062 and getStatus cleanup)

2007-01-12 Thread Jean-Marc Lasgouttes
> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes: Bo> Your solution may be wrong because C-< should not work without Bo> buffer, but 'bookmark-goto 1/2/3' etc should work without buffer. Are you sure that C-< should not work without buffer? Why? JMarc

Re: Bug 3062 AGAIN! (Re: [PATCH] bug 3062 and getStatus cleanup)

2007-01-08 Thread Bo Peng
The only part that is really relevant to the bug is that I use an ASSERT when the bookmark is not valid in BOOKMARK_GOTO. Using "break;" there is not a good idea, since the problem should never happen. Maybe I understood the problem wrong. It appears to me that bookmark will always be valid thro

Re: [patch] bug 3062

2007-01-08 Thread Bo Peng
As I said, it's used if you back from a label to its reference. We have the shortcut Ctrl-< for this (and C-> for the other way round), so it's not wrong. bookmark 0 is used for two internal purposes, and label is one of them. I now see why it is useful to you. I will close the ticket. Bo

Re: Bug 3062 AGAIN! (Re: [PATCH] bug 3062 and getStatus cleanup)

2007-01-08 Thread Jürgen Spitzmüller
Jean-Marc Lasgouttes wrote: > Since it seems that nobody cared that I posted a correct patch for bug > 3062 on Friday and preferred to use a half-baked one instead, I post > it again (but with big letters this time) ;-P oops, sorry, I really seem to have missed that. Jürgen

Bug 3062 AGAIN! (Re: [PATCH] bug 3062 and getStatus cleanup)

2007-01-08 Thread Jean-Marc Lasgouttes
Since it seems that nobody cared that I posted a correct patch for bug 3062 on Friday and preferred to use a half-baked one instead, I post it again (but with big letters this time) ;-P The only part that is really relevant to the bug is that I use an ASSERT when the bookmark is not valid in BOOK

Re: [patch] bug 3062

2007-01-07 Thread Jürgen Spitzmüller
Bo Peng wrote: > First, "bookmark-goto 0" is wrong. Bookmark 0 is for internal use only > and should not be bounded to any shortcut. As I said, it's used if you back from a label to its reference. We have the shortcut Ctrl-< for this (and C-> for the other way round), so it's not wrong. But I s

Re: [patch] bug 3062

2007-01-07 Thread Bo Peng
I will submit a patch soon. Patch submitted, please test. I did not remove 'bookmark-goto 0' because someone may have some valid use of it, though I am not aware of any. Bo

Re: [patch] bug 3062

2007-01-07 Thread Bo Peng
it probably would be better do disable LFUN_BOOKMARKS_GOTO for the temporary bookmark 0 (label) if it doesn't exist. First, "bookmark-goto 0" is wrong. Bookmark 0 is for internal use only and should not be bounded to any shortcut. "bookmark-goto 1" should be used. Due to the stack nature of book

[patch] bug 3062

2007-01-07 Thread Jürgen Spitzmüller
http://bugzilla.lyx.org/show_bug.cgi?id=3062 The attached patch avoids the assert reported in this bug. However, it probably would be better do disable LFUN_BOOKMARKS_GOTO for the temporary bookmark 0 (label) if it doesn't exist. However, I have no idea how. Bo, could you have a look? Jürgen I

[PATCH] bug 3062 and getStatus cleanup

2007-01-05 Thread Jean-Marc Lasgouttes
I started to look at bug 3062 (crash when pressing C-<) and found out seriously weird code in LyXFunc::getStatus. Bo, Peter, I think the code was yours. Do you see anything wrong with my rewrite? Basically, when a lfun can work without a buffer one just has to specify the NoBuffer flag in LyXActio