[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] undoing replacings in a marked region goes wrong

From: Benno Schulenberg
Subject: Re: [Nano-devel] undoing replacings in a marked region goes wrong
Date: Wed, 01 Apr 2015 20:50:03 +0200

On Wed, Apr 1, 2015, at 19:41, Mark Majeres wrote:
> I assume it doesn’t stop and wraps to the top of the file when
> replacing one a time?

It does.

> This doesn't happen just when option 'A' is used?

Visibly there is no wrap-around, but apparently it does
because it replaces all and ends with the last one before
the selected region -- because that's the first one that
gets undone by an M-U.

> Can you exam the conditional statement in a debugger and make any
> sense of why it isn't working?


Upon the first hit of the breakpoint after the first replacement
has just been done, placed at the second conditional (which I've
moved to inside the body of «if (i > 0 || replaceall) {}»):

Breakpoint 1, do_replace_loop (whole_word=false, canceled=0x0, 
real_current=0x80fe660, real_current_x=0xbfffef9c, 
    needle=0x807c678 "the") at search.c:877
877             if( old_mark_set && openfile->current == bot && 
openfile->current_x > bot_x )
(gdb) print old_mark_set
$1 = true
(gdb) print openfile->current
$2 = (filestruct *) 0x80fe6b8
(gdb) print bot
$3 = (filestruct *) 0x807a400
(gdb) print openfile->current_x
$4 = 44
(gdb) print bot_x
$5 = 0


-- - Or how I learned to stop worrying and
                          love email again

reply via email to

[Prev in Thread] Current Thread [Next in Thread]