Ticket #63 (new defect) — at Initial Version

Opened 11 years ago

Last modified 6 years ago

savannah: Search and replace misbehavior with regexps and lines>=1024 chars

Reported by: slavazanko Owned by:
Priority: major Milestone: 4.7
Component: mcedit Version:
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

Original: http://savannah.gnu.org/bugs/?19329

Submitted by:Martin Petricek <bilboq>Submitted on:Fri 16 Mar 2007 11:01:26 PM UTC
Category:EditorSeverity:3 - Normal
Status:NonePrivacy:Public
Assigned to:NoneOpen/Closed:Open
Release:current (CVS or snapshot)Operating System:GNU/Linux

Discussion:

Fri 16 Mar 2007 11:01:26 PM UTC, original submission:

When I press F4 in editor and use regexp like "^something$", only 
first 1024 chars are considered as "line".

How to reproduce:

Create file with a line in format:
x=yyyyyyyyyyyyyy .... yyyyyyyy

(the string x=should be followed by 2000 characters "y")

Jump to first char in file and press F4 (Search and replace).
Type "^x=.*$" in the search string, leave replacement string blank 
and tick "Regular expression" toggle.

This regexp is supposed to replace the mentioned line with nothing 
(i.e. delete it :). Actually, only first 1024 characters of the line
 are deleted, rest of the line remains.

This can lead to file corruption if you do "replace all without 
prompting" and notice this bug too late (i.e. after you have saved 
the file).
Note: See TracTickets for help on using tickets.