summaryrefslogtreecommitdiff
path: root/noncore/apps/tinykate/libkate/document
Side-by-side diff
Diffstat (limited to 'noncore/apps/tinykate/libkate/document') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/document/katebuffer.cpp2
-rw-r--r--noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/noncore/apps/tinykate/libkate/document/katebuffer.cpp b/noncore/apps/tinykate/libkate/document/katebuffer.cpp
index 38ba55d..22a4917 100644
--- a/noncore/apps/tinykate/libkate/document/katebuffer.cpp
+++ b/noncore/apps/tinykate/libkate/document/katebuffer.cpp
@@ -112,25 +112,25 @@ KWBuffer::slotLoadFile()
{
loadFilePart();
// emit linesChanged(m_totalLines);
emit linesChanged(20);
}
/**
* Return the total number of lines in the buffer.
*/
int
KWBuffer::count()
{
-// qDebug("m_stringList.count %d",m_stringList.count());
+ qDebug("m_stringList.count %d",m_stringList.count());
return m_lineCount;
// return m_stringList.count();
// return m_totalLines;
}
void KWBuffer::seek(int i)
{
if (m_stringListCurrent == i)
return;
while(m_stringListCurrent < i)
{
diff --git a/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp b/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
index 844f27d..f90a5f8 100644
--- a/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
+++ b/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
@@ -62,25 +62,25 @@ void SyntaxDocument::setupModeList(bool force)
for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
QString Group="Highlighting_Cache"+path+*it;
if ((config->hasGroup(Group)) && (!force))
{
config->setGroup(Group);
syntaxModeListItem *mli=new syntaxModeListItem;
mli->name = config->readEntry("name","");
mli->section = config->readEntry("section","");
mli->mimetype = config->readEntry("mimetype","");
mli->extension = config->readEntry("extension","");
- mli->identifier = *it;
+ mli->identifier = path+*it;
myModeList.append(mli);
}
else
{
qDebug("Found a description file:"+path+(*it));
setIdentifier(path+(*it));
Opie::XMLElement *e=m_root;
if (e)
{
e=e->firstChild();
qDebug(e->tagName());
if (e->tagName()=="language")
@@ -96,24 +96,25 @@ void SyntaxDocument::setupModeList(bool force)
mli->identifier = path+(*it);
config->setGroup(Group);
config->writeEntry("name",mli->name);
config->writeEntry("section",mli->section);
config->writeEntry("mimetype",mli->mimetype);
config->writeEntry("extension",mli->extension);
myModeList.append(mli);
}
}
}
}
+ config->write();
// config->sync();
}
SyntaxModeList SyntaxDocument::modeList()
{
return myModeList;
}
bool SyntaxDocument::nextGroup( syntaxContextData* data)
{
if(!data) return false;