[Midnight Commander] #1868: stuck on replace with regexp

105 views
Skip to first unread message

Ticket System

unread,
Dec 7, 2009, 11:23:08 AM12/7/09
to fir...@gmail.com, mc-...@googlegroups.com
#1868: stuck on replace with regexp
-----------------------+----------------------------------------------------
Reporter: fp | Owner:
Type: defect | Status: new
Priority: minor | Milestone: 4.7
Component: mcedit | Version: 4.7.0-pre2
Severity: no branch | Keywords:
Votes: | Blocking:
Blockedby: |
-----------------------+----------------------------------------------------
summary:
mcedit stuck and eating resources on replace with regexp

how-to-repeat:
1. create/open dummy file
2. replace (with regexp enabled)
- on search string, put: a single circumflex accent
- on replacement string, put *any string*
- on confirm replace, select All
3. boom. mcedit stuck and start eating resources

system:
Fedora release 12
mc-4.7.0-0.4.pre2.fc12.x86_64


tq,

--
Ticket URL: <www.midnight-commander.org/ticket/1868>
Midnight Commander <www.midnight-commander.org>
Midnight Development Center

Ticket System

unread,
Dec 7, 2009, 12:30:36 PM12/7/09
to fir...@gmail.com, mc-...@googlegroups.com
#1868: stuck on replace with regexp
-----------------------+----------------------------------------------------
Reporter: fp | Owner:
Type: defect | Status: new
Priority: minor | Milestone: 4.7
Component: mcedit | Version: 4.7.0-pre2
Severity: no branch | Resolution:
Keywords: | Votes:
Blocking: | Blockedby:
-----------------------+----------------------------------------------------

Comment(by andrew_b):

Please try latest release instead of pre2. See http://www.midnight-
commander.org/wiki/NightlyBuilds.

--
Ticket URL: <www.midnight-commander.org/ticket/1868#comment:1>

Ticket System

unread,
Dec 10, 2009, 10:23:33 AM12/10/09
to fir...@gmail.com, mc-...@googlegroups.com
#1868: stuck on replace with regexp
-----------------------+----------------------------------------------------
Reporter: fp | Owner:
Type: defect | Status: new
Priority: minor | Milestone: 4.7
Component: mcedit | Version: 4.7.0-pre2
Severity: no branch | Resolution:
Keywords: | Votes:
Blocking: | Blockedby:
-----------------------+----------------------------------------------------
Changes (by fp):

* cc: fir...@gmail.com (added)


Comment:

ok, i've test rebuild from source rpm from:
- mc-4.7.0-0.7.pre4.fc13.src.rpm
- mc-4.7.0.pre4.148.g1f900af-1.fc12.src.rpm

the problem still exists with both version above.

fyi, expected result should be the same as doing this command on Vi or Vim

{{{
%s/^/TEST/g
}}}


tq,

--
Ticket URL: <www.midnight-commander.org/ticket/1868#comment:2>

Ticket System

unread,
Dec 10, 2009, 2:16:02 PM12/10/09
to fir...@gmail.com, mc-...@googlegroups.com
#1868: stuck on replace with regexp
-----------------------+----------------------------------------------------
Reporter: fp | Owner:
Type: defect | Status: new
Priority: minor | Milestone: 4.7
Component: mcedit | Version: 4.7.0-pre2
Severity: no branch | Resolution:
Keywords: | Votes:
Blocking: | Blockedby:
-----------------------+----------------------------------------------------

Comment(by andrew_b):

Another test case:
1. Open emtpy file (Shift-F4).
2. Type "123456"
3. Place cursor to '4' symbol.
4. Call replace dialog. Set search string to '^', set replace string to
"aaa". Select "Regular expression". Press Enter.
5. Press "Replace" in "Confirm replace" dialog.
6. Replacement result is "123aaa456". Expected result is "aaa123456" (as
in ViM).

In any case the replacement starts from current cursor position, but
sometimes such behaviour produces incorrect results.

--
Ticket URL: <www.midnight-commander.org/ticket/1868#comment:3>

Ticket System

unread,
Dec 10, 2009, 2:19:47 PM12/10/09
to fir...@gmail.com, mc-...@googlegroups.com
#1868: stuck on replace with regexp
-----------------------+----------------------------------------------------
Reporter: fp | Owner:
Type: defect | Status: new
Priority: minor | Milestone: 4.7
Component: mcedit | Version: 4.7.0-pre2
Severity: no branch | Resolution:
Keywords: | Votes:
Blocking: | Blockedby:
-----------------------+----------------------------------------------------

Comment(by andrew_b):

Replying to [comment:3 andrew_b]:

> Set search string to '^',

Set search to '!^' ("line start" regexp).

--
Ticket URL: <www.midnight-commander.org/ticket/1868#comment:4>

Ticket System

unread,
Feb 21, 2010, 1:06:44 AM2/21/10
to fir...@gmail.com, mc-...@googlegroups.com
#1868: stuck on replace with regexp
-----------------------+----------------------------------------------------
Reporter: fp | Owner:
Type: defect | Status: new
Priority: minor | Milestone: 4.7
Component: mcedit | Version: 4.7.0-pre2
Severity: no branch | Resolution:
Keywords: | Votes:
Blocking: | Blockedby:
-----------------------+----------------------------------------------------

Comment(by sim):

[http://DECORATION-STAIR.INFO decoration]
Changed 1 year ago by admin

[http://SUPER-SALE-BATHTUB.INFO bathtub]
Changed 1 year ago by admin

[http://CHEAP-SOLAR-SYSTEM.INFO solar system]
Changed 1 year ago by admin

[http://CHEAP-STAIR-PARTS.INFO stair parts]
Changed 1 year ago by admin

[http://CHINA-SOLAR-SUPPLY.INFO solar supply]
Changed 1 year ago by admin

--
Ticket URL: <www.midnight-commander.org/ticket/1868#comment:5>

Ticket System

unread,
Sep 18, 2010, 10:32:01 AM9/18/10
to fir...@gmail.com, mc-...@googlegroups.com
#1868: stuck on replace with regexp
-----------------------+----------------------------------------------------
Reporter: fp | Owner: fp
Type: defect | Status: accepted
Priority: minor | Milestone: 4.7
Component: mcedit | Version: 4.7.0-pre2
Severity: no branch | Resolution:
Keywords: | Votes:
Blocking: | Blockedby:
-----------------------+----------------------------------------------------
Changes (by fp):

* owner: => fp
* status: new => accepted

Ticket System

unread,
Sep 18, 2010, 11:28:27 AM9/18/10
to fir...@gmail.com, mc-...@googlegroups.com
#1868: stuck on replace with regexp
-----------------------+----------------------------------------------------
Reporter: fp | Owner: fp
Type: defect | Status: accepted
Priority: minor | Milestone: 4.7
Component: mcedit | Version: 4.7.0-pre2
Severity: no branch | Resolution:
Keywords: | Votes:
Blocking: | Blockedby:
-----------------------+----------------------------------------------------

Comment(by fp):

hello,

sorry for late respons, here some updates for this bug:

== replace with REPLACE button, now works well (line by line), with single
{{{'^'}}} mark on search string.
as in Vim:
(REPLACE) : {{{s/^/123/g}}}

== replace with REPLACE and ALL button, now works well, while char(s)
follow the {{{'^'}}} mark.
as in Vim:
(REPLACE) : {{{s/^a/123/g}}}
(ALL) : {{{%s/^a/123/g}}}

example:
file content:
abc
abc
abc

search string:
{{{^a}}}

replacement string:
123

result:
123bc
123bc
123bc

== replace with ALL button, __still buggy__, with single {{{'^'}}} mark on
search string.
as in Vim:
(ALL) : {{{%s/^/123/g}}}


tested on:
* 4.7.0.9 (source build)
* mc-4.7.4-1.fc12.x86_64


tq,

--
Ticket URL: <www.midnight-commander.org/ticket/1868#comment:6>

Ticket System

unread,
Mar 30, 2011, 6:51:21 AM3/30/11
to fir...@gmail.com, mc-...@googlegroups.com
#1868: stuck on replace with regexp
-----------------------+--------------------------------
Reporter: fp | Owner: fp
Type: defect | Status: accepted
Priority: minor | Milestone: 4.8
Component: mcedit | Version: master
Severity: no branch | Resolution:
Keywords: | Blocked By:
Blocking: | Votes for changeset:
-----------------------+--------------------------------
Changes (by zyv):

* version: 4.7.0-pre2 => master
* milestone: 4.7 => 4.8


--
Ticket URL: <www.midnight-commander.org/ticket/1868#comment:7>

Reply all
Reply to author
Forward
0 new messages