Re: [LyX master] Fix assertion related to cursor anchor.

2013-04-27 Thread Jean-Marc Lasgouttes
Le 27/04/2013 11:20, Jean-Marc Lasgouttes a écrit : Fix assertion related to cursor anchor. Richard, please check. I think you got the logic wrong. JMarc - if (anchor_.depth() >= depth()) { - // LASSERT: There have been several bugs around this code, that s

Re: Cursor anchor point & multiple views

2012-01-09 Thread Jean-Marc Lasgouttes
Le 09/01/2012 02:07, Tommaso Cucinotta a écrit : Hi, if I split the LyX window (up/down or left/right), and I edit from one of them, then the cursor on the other view keeps its paragraph and position numerical values, not really its position, i.e., it is not anchored to the text where it lies. F

Cursor anchor point & multiple views

2012-01-08 Thread Tommaso Cucinotta
Hi, if I split the LyX window (up/down or left/right), and I edit from one of them, then the cursor on the other view keeps its paragraph and position numerical values, not really its position, i.e., it is not anchored to the text where it lies. For example, if from one view I create a new pa

Re: Cursor::anchor()

2008-09-25 Thread Martin Vermeer
On Thu, Sep 25, 2008 at 01:20:39PM +0200, Vincent van Ravesteijn - TNW wrote: > > > How can I modify the anchor position of a selection ? > > > >Why do you need to do that, actually? > > > >Jmarc > > Well, if you select multiple lines and you hit tab then a tab will be > inserted at the beginni

Re: Cursor::anchor()

2008-09-25 Thread Jean-Marc Lasgouttes
"Vincent van Ravesteijn - TNW" <[EMAIL PROTECTED]> writes: > Well, if you select multiple lines and you hit tab then a tab will be > inserted at the beginning of each line. > > As a consequence, the selection needs to be updated to shift one pos to > the right.. Just redo the selection with the r

RE: Cursor::anchor()

2008-09-25 Thread Vincent van Ravesteijn - TNW
> How can I modify the anchor position of a selection ? > >Why do you need to do that, actually? > >Jmarc Well, if you select multiple lines and you hit tab then a tab will be inserted at the beginning of each line. As a consequence, the selection needs to be updated to shift one pos to the r

Re: Cursor::anchor()

2008-09-25 Thread Jean-Marc Lasgouttes
"Vincent van Ravesteijn - TNW" <[EMAIL PROTECTED]> writes: > How can I modify the anchor position of a selection ? Why do you need to do that, actually? JMarc

Re: Cursor::anchor()

2008-09-24 Thread Andre Poenitz
On Wed, Sep 24, 2008 at 09:48:36PM +0200, Vincent van Ravesteijn wrote: > Well, I wasn't that clear, but all attempts failed until I came across > the following : > > //private: >/// the anchor position >DocIterator anchor_; > Now, I understand why somebody has commented out the private

Re: Cursor::anchor()

2008-09-24 Thread Vincent van Ravesteijn
In the following code, shouldn't we return a const CursorSlice and/or document that the returned CursorSlice isn't the true anchor, but a normalized _copy_ of the anchor ? /// access to normalized selection anchor CursorSlice Cursor::anchor() const { LASSERT(anchor

Re: Cursor::anchor()

2008-09-24 Thread Andre Poenitz
this.. > > > In the following code, shouldn't we return a const CursorSlice and/or > document that the returned CursorSlice isn't the true anchor, but a > normalized _copy_ of the anchor ? > > /// access to normalized selection anchor > CursorSlice C

Cursor::anchor()

2008-09-24 Thread Vincent van Ravesteijn - TNW
orSlice isn't the true anchor, but a normalized _copy_ of the anchor ? /// access to normalized selection anchor CursorSlice Cursor::anchor() const { LASSERT(anchor_.depth() >= depth(), /**/); CursorSlice normal = anchor_[depth() - 1]; if (depth() < anchor_.de