On Fri, 18 Feb 2011 18:09:29 +0200 Tom Hacohen <t...@stosb.com> said:

> On Fri, Feb 18, 2011 at 4:12 PM, WooHyun Jung <wh0705.j...@samsung.com>wrote:
> 
> > Why not called ? Because ~ evas_textblock_cursor_compare(tc, en->cursor)
> > returns 0.
> >
> > (i.e. old cursor and current cursor have the same position information)
> >
> >
> >
> > I think old cursor should keep its position without any updating.
> >
> It does keep the same position information...
> Lets assume we have the string "ABCD"
> And you have the cursor pointing to C, i.e pos = 2
> So pressing backspace will delete B and change pos to 1, so it'll still
> point to C, as it should.
> Way to know if it has changed: either doing the slower, but correct thing:
> checking the coordinates
> and see if they have changed (which is what you care about in this case,
> isn't it?) or you can
> just check (which is very cheap) if the cursor position have changed (i.e
> what you do now) or if
> the paragraph length have changed, but that's a bit hacky :P
> 
> It just depends what you want to do, honestly, but unless I got you wrong,
> the current behavior
> is correct.

no no - you got him wrong. currently is creates a tmp cursor, copies current
cursor to tmp cursor, then does the operation (delete char to the left of
cursor). it then COMPARES cursor and tmp cursor. if different - send messages
to say the cursor moved/changed. entry depends on this to know if/when to
reposition things that are relative to the cursor. the cursor DID change BUT...
textblock adjusted BOTH cursors so they are now the same so the comparison
doesnt show a difference, thus no emit of signal.

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to