merge SVN commit 600801 by winterz:

Custom templates patch from Dmitry: make %CURSOR command really work everywhere.

svn path=/branches/KDE/3.5/kdepim/; revision=614030
wilder-work
Allen Winter 20 years ago
parent b8d0fd346b
commit 772b8af479
  1. 7
      kmcomposewin.cpp
  2. 2
      kmedit.cpp

@ -1971,6 +1971,9 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign,
QTimer::singleShot( 200, this, SLOT(slotAppendSignature()) );
}
setModified( isModified );
// do this even for new messages
mEditor->setCursorPositionFromStart( (unsigned int) mMsg->getCursorPos() );
}
@ -4014,7 +4017,9 @@ void KMComposeWin::slotAppendSignature()
{
mEditor->append(mOldSigText);
mEditor->setModified(mod);
mEditor->setContentsPos( 0, 0 );
// interfere with %CURSOR template command
// mEditor->setContentsPos( 0, 0 );
mEditor->setCursorPositionFromStart( (unsigned int) mMsg->getCursorPos() );
mEditor->sync();
}
}

@ -732,7 +732,7 @@ void KMEdit::slotSpellDone()
}
}
void KMEdit::setCursorPositionFromStart(unsigned int pos) {
void KMEdit::setCursorPositionFromStart( unsigned int pos ) {
unsigned int l = 0;
unsigned int c = 0;
posToRowCol( pos, l, c );

Loading…
Cancel
Save