Bug 112141 - Scripting interface in Konversation
Summary: Scripting interface in Konversation
Status: RESOLVED DUPLICATE of bug 114237
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-07 04:14 UTC by Sgeo
Modified: 2006-10-08 20:52 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sgeo 2005-09-07 04:14:18 UTC
Version:            (using KDE KDE 3.4.2)
Installed from:    Unlisted Binary Package

It would be nice if Konversation had a scripting interface similar to X-Chat
Comment 1 Anders Lund 2005-11-06 11:54:42 UTC
SVN commit 478258 by alund:

Untranslated error message to inform users that we can't replace newlines.
Dont' attempt to, as it may lead to an infinite loop, again potentially leading to a crash at some point.
BUG:112141


 M  +8 -0      katecmds.cpp  


--- branches/KDE/3.5/kdelibs/kate/part/katecmds.cpp #478257:478258
@@ -373,6 +373,7 @@
   // * the existing insertion is fine, including the line calculation.
 
   QStringList patterns = QStringList::split( QRegExp("(^\\\\n|(?![^\\\\])\\\\n)"), find, true );
+
   if ( patterns.count() > 1 )
   {
     for ( uint i = 0; i < patterns.count(); i++ )
@@ -488,6 +489,13 @@
   exchangeAbbrevs(replace);
    kdDebug(13025)<< "SedReplace: replace=" << replace.latin1() <<endl;
 
+   if ( find.contains("\\n") )
+   {
+     // FIXME i18n this message (or make it work)
+     msg = "Sorry, but we can't replace newlines (yet)";
+     return false;
+   }
+
   KateDocument *doc = ((KateView*)view)->doc();
   if ( ! doc ) return false;
 
Comment 2 Anders Lund 2005-11-06 12:15:13 UTC
I'm VERY sorry, but i put the wrong number in my commit message. My deepest apologizes
Comment 3 Ismail Donmez 2005-11-06 14:35:21 UTC
No problem Anders :)
Comment 4 Dominik Haumann 2006-07-03 00:17:47 UTC
SVN commit 557315 by dhaumann:

forward port SVN commit 478258 by alund:

Error message to inform users that we can't replace newlines.
Dont' attempt to, as it may lead to an infinite loop, again potentially leading to a crash at some point.
CCBUG:112141


 M  +7 -0      katecmds.cpp  


--- trunk/KDE/kdelibs/kate/part/katecmds.cpp #557314:557315
@@ -497,6 +497,13 @@
   exchangeAbbrevs(replace);
    kDebug(13025)<< "SedReplace: replace=" << replace <<endl;
 
+  if ( find.contains("\\n") )
+  {
+    // FIXME: make replacing newlines work
+    msg = i18n("Sorry, but Kate is not able to replace newlines, yet");
+    return false;
+  }
+
   KateDocument *doc = ((KateView*)view)->doc();
   if ( ! doc ) return false;
 
Comment 5 Dominik Haumann 2006-07-03 00:21:32 UTC
Uh, I shouldn't have blindly used the commit log message, same as Anders:
I'm VERY sorry, but i put the wrong number in my commit message. My deepest apologizes ;)
Comment 6 Eike Hein 2006-10-08 20:52:51 UTC

*** This bug has been marked as a duplicate of 114237 ***