Summary: | Kate uses 100% CPU on serach and replace in VM emulation mode. | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Dotan Cohen <kde-2011.08> |
Component: | Vi Input Mode | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kde-2011.08, michal.humpula |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kate/9ff1f156d80a2c48386fd58a72401ea6a84d5bce | Version Fixed In: | 4.13 |
Sentry Crash Report: |
Description
Dotan Cohen
2014-01-05 19:27:46 UTC
Hi Dotan, nice catch!;-) I can replicate and I've already saw what is going on. It's not vi-mode problem. But I'm interested... what were you trying accomplish with that substitution command? If I read it correctly it could pretty much match the "". And the "|\s*" is pretty much an error isn't it? Still the kate should go for endless loop like that. For the swap file recovery... that command you've wrote caused an enormous amout of changes on the document, so when you've tried to recover, swap recovery process tried to do the same thing as the subtitution command. So that one was actually acting correctly according to input. Note to myself or anyone willing to fix it. Problem lies somewhere in KateCommands::SedReplace::InteractiveSedReplacer::replaceCurrentMatch or KateRegExpSearch::search Depends how you look at it. Be aware of simple fixes that lead to breaking up the "s/$/x/g" case. Git commit 9ff1f156d80a2c48386fd58a72401ea6a84d5bce by Michal Humpula. Committed on 22/02/2014 at 20:41. Pushed by michalhumpula into branch 'master'. vi-mode: fix deadly s/\s*/x/g loop FIXED-IN: 4.13 M +19 -10 part/utils/katecmds.cpp M +2 -0 tests/vimode_test.cpp http://commits.kde.org/kate/9ff1f156d80a2c48386fd58a72401ea6a84d5bce Great Michal, thank you! |