[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: |
Thu, 02 Apr 2015 14:14:05 +0200 |
Hi Mark,
> 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?
I've made the exit condition into this, which works for me:
if (old_mark_set && (openfile->current->lineno > bot->lineno ||
openfile->current->lineno < top->lineno))
break;
if (old_mark_set && openfile->current == bot && openfile->current_x >
bot_x)
break;
if (old_mark_set && openfile->current == top && openfile->current_x <
top_x)
break;
It can be glued together, of course, but this is just to show
the logic.
Full patch attached. Anything amiss?
Benno
--
http://www.fastmail.com - A fast, anti-spam email service.
exit-when-outside-region.patch
Description: Text Data
- Re: [Nano-devel] undoing replacings in a marked region goes wrong, Benno Schulenberg, 2015/04/01
- Re: [Nano-devel] undoing replacings in a marked region goes wrong, Mark Majeres, 2015/04/01
- Re: [Nano-devel] undoing replacings in a marked region goes wrong, Benno Schulenberg, 2015/04/01
- Re: [Nano-devel] undoing replacings in a marked region goes wrong, Mark Majeres, 2015/04/01
- Re: [Nano-devel] undoing replacings in a marked region goes wrong, Benno Schulenberg, 2015/04/01
- Re: [Nano-devel] undoing replacings in a marked region goes wrong, Mark Majeres, 2015/04/01
- Re: [Nano-devel] undoing replacings in a marked region goes wrong, Mark Majeres, 2015/04/01
- Re: [Nano-devel] undoing replacings in a marked region goes wrong, Benno Schulenberg, 2015/04/01
- Re: [Nano-devel] undoing replacings in a marked region goes wrong, Benno Schulenberg, 2015/04/01
- Re: [Nano-devel] undoing replacings in a marked region goes wrong, Benno Schulenberg, 2015/04/01
- Re: [Nano-devel] undoing replacings in a marked region goes wrong,
Benno Schulenberg <=
- Re: [Nano-devel] undoing replacings in a marked region goes wrong, Benno Schulenberg, 2015/04/02
- Re: [Nano-devel] undoing replacings in a marked region goes wrong, Benno Schulenberg, 2015/04/02
- [Nano-devel] [patch v7] properly undoing replacements in a marked region, Benno Schulenberg, 2015/04/08
- Re: [Nano-devel] [patch v7] properly undoing replacements in a marked region, Benno Schulenberg, 2015/04/16