diff options
| author | 2006-12-27 21:32:34 +0000 | |
|---|---|---|
| committer | 2006-12-27 21:32:34 +0000 | |
| commit | 52c9999e913b74e126b1af69290c3b16c0591954 (patch) | |
| tree | 09ec0ee701529ecd625efe99f406f34767f173db /src/modules/editor/scripteditor.cpp | |
| parent | *AUTOMATICALLY* updated KVI_SOURCES_DATE variable (diff) | |
| download | KVIrc-52c9999e913b74e126b1af69290c3b16c0591954.tar.gz KVIrc-52c9999e913b74e126b1af69290c3b16c0591954.tar.bz2 KVIrc-52c9999e913b74e126b1af69290c3b16c0591954.zip | |
some fixes and some new code improvements
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@72 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/editor/scripteditor.cpp')
| -rw-r--r-- | src/modules/editor/scripteditor.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/modules/editor/scripteditor.cpp b/src/modules/editor/scripteditor.cpp index 46e13fa0e..5fddae3c2 100644 --- a/src/modules/editor/scripteditor.cpp +++ b/src/modules/editor/scripteditor.cpp @@ -447,6 +447,7 @@ bool KviScriptEditorWidget::contextSensitiveHelp() const QString parse; KviQString::sprintf(parse,"timer -s (help,0){ help -s %Q; }",&buffer); + debug ("parsing %s",parse.latin1()); KviKvsScript::run(parse,(KviWindow*)g_pApp->activeConsole()); return true; @@ -668,7 +669,30 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const QString &text,int endSt continue; } } - // not an else... FIXME: should check for callbacks.. but that's prolly too difficult :) + else + if(pBegin->unicode() == 'f') + { + if(c - pBegin == 8) + { + // might be "function" + QString tmp(pBegin,8); + if(tmp.lower() == "function")bNewCommand = true; + continue; + } + } + + if(pBegin->unicode() == 'i') + { + if(c - pBegin == 8) + { + // might be "internal" + QString tmp(pBegin,8); + if(tmp.lower() == "internal")bNewCommand = true; + continue; + } + } + + // not an else or special command function... FIXME: should check for callbacks.. but that's prolly too difficult :) continue; } } @@ -1143,8 +1167,9 @@ void KviScriptEditorReplaceDialog::slotReplace() { QString txt=((KviScriptEditorWidget *)m_pParent)->text(); if (checkReplaceAll->isChecked()) emit replaceAll(m_pFindlineedit->text(),m_pReplacelineedit->text()); - else txt.replace(m_pFindlineedit->text(),m_pReplacelineedit->text(),false); + txt.replace(m_pFindlineedit->text(),m_pReplacelineedit->text(),false); ((KviScriptEditorWidget *)m_pParent)->setText(txt); + ((KviScriptEditorWidget *)m_pParent)->setModified(true); m_pFindlineedit->setText(""); m_pReplacelineedit->setText(""); setTabOrder(m_pFindlineedit,m_pReplacelineedit); |
