[prev in list] [next in list] [prev in thread] [next in thread]
List: nano-devel
Subject: Re: [Nano-devel] the difficulties of behaving similar
From: Mark Majeres <mark () engine12 ! com>
Date: 2014-06-22 12:58:41
Message-ID: CAG40++GjJpKo3r1w3Oh+aKXBD6Tq5ge6hgJsTN3cTrt_a6jBTA () mail ! gmail ! com
[Download RAW message or body]
> Ehm, no, that's not good. Now an <Up> <Down> or a
> <Left> <Right> will not break a series of ^Ks. It
> must; Pico does so too. This way no one will be able
> to figure out how to make Nano forget what was cut.
>
> Any displacement of the cursor should reset the buffer,
> also when the cursor returns to the same spot afterward.
Ok, I put `em back. New version is attached.
["cutbuffer_reset.5008.patch" (text/x-patch)]
Index: src/text.c
===================================================================
--- src/text.c (revision 5008)
+++ src/text.c (working copy)
@@ -843,9 +843,9 @@
/* Ugh, if we were called while cutting not-to-end, non-marked, and
* on the same lineno, we need to abort here. */
u = fs->current_undo;
- if (u && u->mark_begin_lineno == fs->current->lineno &&
+ if (u && u->mark_begin_lineno == fs->current->lineno && u->mark_begin_x == fs->current_x &&
((current_action == CUT && u->type == CUT && !u->mark_set && keeping_cutbuffer()) ||
- (current_action == ADD && u->type == ADD && u->mark_begin_x == fs->current_x)))
+ (current_action == ADD && u->type == ADD)))
return;
/* Blow away the old undo stack if we are starting from the middle. */
_______________________________________________
Nano-devel mailing list
Nano-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/nano-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic