| Summary: | kate doesn't position to remembered line like version with KDE-3.05a | ||
|---|---|---|---|
| Product: | [Applications] kate | Reporter: | James <bjlockie> |
| Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | l.savernik |
| Priority: | NOR | ||
| Version First Reported In: | 2.1 | ||
| Target Milestone: | --- | ||
| Platform: | Gentoo Packages | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
James
2003-02-03 07:22:56 UTC
anders, have you some ideas ? needs to be redone after the "create views on using" changes to make starting faster Subject: Re: kate doesn't position to remembered line like version with KDE-3.05a
On Tuesday 22 July 2003 20:25, Christoph Cullmann wrote:
> anders, have you some ideas ? needs to be redone after the "create views on
> using" changes to make starting faster
Locally fixed, I'll commit after checking tomorrow ;)
-anders
Partially fixed in CVS. It will work now, as long as you has actually had a view for the file in your current session. atm out of order I guess in cvs after my session rework, we need to adjust the view restore to the latest changes back to work again Cursor positions aren't remembered for all open files except the current one. See dupe bug 75997 for details. *** Bug 75997 has been marked as a duplicate of this bug. *** CVS commit by alund: restore view configuration in addview if possible This should be backported to branch -- christoph? CCMAIL: 53969-done@bugs.kde.org M +22 -2 kateviewspace.cpp 1.34 M +1 -0 kateviewspace.h 1.19 --- kdebase/kate/app/kateviewspace.h #1.18:1.19 @@ -102,4 +102,5 @@ class KateViewSpace : public QVBox KVSSBSep *sep; KateViewManager *m_viewManager; + QString m_group; private slots: --- kdebase/kate/app/kateviewspace.cpp #1.33:1.34 @@ -91,4 +91,5 @@ KateViewSpace::KateViewSpace( KateViewMa setMinimumWidth (mStatusBar->minimumWidth()); + m_group = QString::null; } @@ -104,4 +105,21 @@ void KateViewSpace::polish() void KateViewSpace::addView(Kate::View* v, bool show) { + // restore the config of this view if possible + if ( !m_group.isEmpty() ) + { + QString fn = v->getDoc()->url().prettyURL(); + if ( ! fn.isEmpty() ) + { + QString vgroup = QString("%1 %2").arg(m_group).arg(fn); + KConfig *config = new KConfig("katesessionrc"); + if ( config->hasGroup( vgroup ) ) { + config->setGroup( vgroup ); + v->readSessionConfig( config ); + } + delete config; // nessecary? nice? + } + } + + uint id = mViewList.count(); stack->addWidget(v, id); @@ -212,4 +230,5 @@ void KateViewSpace::slotStatusChanged (K void KateViewSpace::saveConfig ( KConfig* config, int myIndex ,const QString& viewConfGrp) { + kdDebug()<<"KateViewSpace::saveConfig("<<myIndex<<", "<<viewConfGrp<<") - currentView: "<<currentView()<<")"<<endl; QString group = QString(viewConfGrp+"-ViewSpace %1").arg( myIndex ); @@ -273,4 +291,6 @@ void KateViewSpace::restoreConfig ( Kate if (mViewList.isEmpty()) viewMan->createView (viewMan->m_docManager->document(0)); + + m_group = group; // used for restroing view configs later } //END KateViewSpace |