diff options
author | Ioannis Aslanidis <deathwing00@gentoo.org> | 2006-10-11 09:59:54 +0000 |
---|---|---|
committer | Ioannis Aslanidis <deathwing00@gentoo.org> | 2006-10-11 09:59:54 +0000 |
commit | 9918656274e899acc7906e411b0b3fb7f1a9a0f6 (patch) | |
tree | 7de025ae35d80ca305839dc4040c889d23830c17 /kde-base/kdelibs/files | |
parent | version bump thanks to Bret Towe in irc (diff) | |
download | gentoo-2-9918656274e899acc7906e411b0b3fb7f1a9a0f6.tar.gz gentoo-2-9918656274e899acc7906e411b0b3fb7f1a9a0f6.tar.bz2 gentoo-2-9918656274e899acc7906e411b0b3fb7f1a9a0f6.zip |
Added a patch to fix small issues on the kate component for kdelibs-3.5.5.
(Portage version: 2.1.1)
Diffstat (limited to 'kde-base/kdelibs/files')
-rw-r--r-- | kde-base/kdelibs/files/kdelibs-3.5.5-kate-cstyle-indenter-fix.diff | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/kde-base/kdelibs/files/kdelibs-3.5.5-kate-cstyle-indenter-fix.diff b/kde-base/kdelibs/files/kdelibs-3.5.5-kate-cstyle-indenter-fix.diff new file mode 100644 index 000000000000..c7697a9ad8d4 --- /dev/null +++ b/kde-base/kdelibs/files/kdelibs-3.5.5-kate-cstyle-indenter-fix.diff @@ -0,0 +1,45 @@ +diff -U 4 -H -b -w -B -E -d -i -r kdelibs-3.5.5-orig/kate/part/kateautoindent.cpp kdelibs-3.5.5/kate/part/kateautoindent.cpp +--- kdelibs-3.5.5-orig/kate/part/kateautoindent.cpp 2006-10-11 11:44:37.000000000 +0200 ++++ kdelibs-3.5.5/kate/part/kateautoindent.cpp 2006-10-11 11:47:38.000000000 +0200 +@@ -713,8 +713,9 @@ + int anchorPos = 0; + int parenCount = 0; // Possibly in a multiline for stmt. Used to skip ';' ... + bool found = false; + bool isSpecial = false; ++ bool potentialAnchorSeen = false; + + //kdDebug(13030) << "calcIndent begin line:" << begin.line() << " col:" << begin.col() << endl; + + // Find Indent Anchor Point +@@ -732,18 +733,18 @@ + if (textLine->attribute(pos) == symbolAttrib) + { + QChar tc = textLine->getChar (pos); + if ((tc == ';' || tc == ':' || tc == ',') && otherAnchor == -1 && parenCount <= 0) +- otherAnchor = pos; ++ otherAnchor = pos, potentialAnchorSeen = true; + else if (tc == ')') + parenCount++; + else if (tc == '(') + parenCount--; + else if (tc == '}') + openCount--; + else if (tc == '{') + { +- openCount++; ++ openCount++, potentialAnchorSeen = true; + if (openCount == 1) + break; + } + } +@@ -825,9 +826,9 @@ + } + } + + // treat beginning of document as anchor position +- if (cur.line() == 0 && cur.col() == 0) ++ if (cur.line() == 0 && cur.col() == 0 && potentialAnchorSeen) + found = true; + + if (!found) + return 0; |