Hello Jean-Marc, Lasgouttes <lasgouttes <at> lyx.org> writes:

> >> What do you mean by "cursor positions"?
> >
> > The position where the text-cursor seems to be appear. I have to edit it as
> > the next step.
> 
> OK.
> 

Tried to update the text cursor position accordingly:
http://git.lyx.org/?p=gsoc.git;a=commitdiff;h=f2614dabfa0b93519ea6e30985d632f2bea871e3

As Richard mentioned earlier; I should have implemented this functionality
in BufferView.cpp. But I could not able to figure out where to add this
code. Could you help me with this? Are the following problems occur related
to where I have put this code?

*When we select a different cursor position in a too wide row using the
mouse; the row gets slide unexpectedly. Here the row should not slide and
only the text cursor should be moved.
*When we select a range of text using the mouse or using Shift + Arrowkeys
the row do not get slides at once. Sliding happens after we take the mouse
pointer back to the screen limits or after we releasing the shift key. I
think what we need is make the row slide as soon as the selection goes
beyond the screen limits.
*After sliding a row, if we select another text row that is not too wide;
that gets shifted by some amount. I think we have to fix this with at a row
changed event. But still I did not figured out which variable should get reset.

I tried to modify the style in TextMetrics.cpp. Could you please review me
that advise me where I need to improve? 

> >> Besides, is it intentionnlly that you skipped the use of
> >> (set|get)ToowideRow?
> >
> > What I thought about this ToowideRow is to be used to set the cursor
> > position, when the cursor move from one row to another. I cannot think of a
> > way to use this to identify the current row where the cursor lies; because I
> > hope to update this variable from the same place that I am sliding the too
> > wide rows. So I used the condition; if (&cur.textRow() == &row).
> 
> The problem is that, when you leave a row where left_edge>0 (row has 
> been slid), this value of left_edge will apply to the row where the 
> cursor is. The code that I proposed is the most convenient place to 
> update this value IMO.

Yes I will do so. In my current code I have this code part in both
Cursor::upDownInMath(bool up) and Cursor::upDownInText(bool up, bool &
updateNeeded)
        if (x_target_ == -1){
                setTargetX(xo);
                left_edge_=0;
        }
I did not modify this part with full understanding. What my opinion was, if
target_X is going to be 0, then we need to reset the left_edge_ too. But
with this code; is not it resetting left_edge_ value to 0 in some situations?

I will try to review your patch and proceed. So, I will discuss about that
later.

Thank you
Hashini


Reply via email to