messagingappbase/msgeditor/viewsrc/MsgAddressControlEditor.cpp
branchRCL_3
changeset 14 c6838af47512
parent 0 72b543305e3a
child 18 fbb813aef148
equal deleted inserted replaced
13:a9c7e5670d17 14:c6838af47512
   222        }
   222        }
   223      numOfEntries = iRichText->ParagraphCount();
   223      numOfEntries = iRichText->ParagraphCount();
   224      if( numOfEntries > 0 && numOfEntries != aEntryNumber && !setcursorpos)
   224      if( numOfEntries > 0 && numOfEntries != aEntryNumber && !setcursorpos)
   225         {
   225         {
   226          TInt  txtlen = TextLength();
   226          TInt  txtlen = TextLength();
   227          TInt  curpos = CursorPos();                
   227          TInt  curpos = CursorPos();        
   228          entryStart = iRichText->CharPosOfParagraph( entryLength, aEntryNumber );
   228          if ( aEntryNumber ) 
   229          curpos+= --entryLength;
   229              {
       
   230              entryStart = iRichText->CharPosOfParagraph( entryLength, aEntryNumber - 1 );         
       
   231              curpos = entryStart + --entryLength ;
       
   232              }
       
   233          else 
       
   234              {
       
   235              entryStart = iRichText->CharPosOfParagraph( entryLength, aEntryNumber );         
       
   236              curpos+= --entryLength;
       
   237              }
       
   238          
   230          if ( TextView() )
   239          if ( TextView() )
   231             {
   240             {
   232                 if(curpos < txtlen)
   241                 if(curpos < txtlen)
   233                 {
   242                 {
   234                     iCusPos = curpos;
   243                     iCusPos = curpos;