[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] the difficulties of behaving similar
From: |
Mark Majeres |
Subject: |
Re: [Nano-devel] the difficulties of behaving similar |
Date: |
Wed, 18 Jun 2014 13:45:00 -0700 |
Benno,
> By the way, this 'u->mark_begin_lineno == fs->current->lineno',
> does it not only apply to the case of 'current_action == ADD'?
yes it applies to both CUT and ADD, the statement has parenthesis and reads
(<condition>&&(<condition>||<condition>))
> For the 'current_action == CUT' condition the mark must not be set,
> so then 'u->mark_begin_lineno' should be irrelevant, no?
u->mark_begin_lineno locates the start of *all* cuts, marked or not.
> And further, is it possible for 'u' to be NULL there? And if not,
> wouldn't an assert make more sense?
yes, u can be null, it's the first check being done in the conditional,
if it is NULL, then shortly after the check a new u is allocated and initialized
> However, in a later patch I will probably move the cutbuffer_reset()
> call to places where they make more sense to me.
Nah, just keep reading the code until it makes sense :)
Relocating the call will only add a pitfall. If someone decides to remove
one of the other calls in nano.c the cut/paste functions will still work fine.
The same cannot be said about the one in add_undo.
--Mark
- Re: [Nano-devel] interrupting contiguous cuts (or not) with horizontal movement, (continued)
- Re: [Nano-devel] interrupting contiguous cuts (or not) with horizontal movement, Mark Majeres, 2014/06/14
- Re: [Nano-devel] interrupting contiguous cuts (or not) with horizontal movement, Mark Majeres, 2014/06/15
- Re: [Nano-devel] interrupting contiguous cuts (or not) with horizontal movement, Benno Schulenberg, 2014/06/15
- Re: [Nano-devel] interrupting contiguous cuts (or not) with horizontal movement, Mark Majeres, 2014/06/15
- Re: [Nano-devel] interrupting contiguous cuts (or not) with horizontal movement, Benno Schulenberg, 2014/06/15
- [Nano-devel] the difficulties of behaving similar, Benno Schulenberg, 2014/06/17
- Re: [Nano-devel] the difficulties of behaving similar, Mark Majeres, 2014/06/18
- Re: [Nano-devel] the difficulties of behaving similar, Benno Schulenberg, 2014/06/18
- Re: [Nano-devel] the difficulties of behaving similar, Mark Majeres, 2014/06/18
- Re: [Nano-devel] the difficulties of behaving similar, Benno Schulenberg, 2014/06/18
- Re: [Nano-devel] the difficulties of behaving similar,
Mark Majeres <=
- Re: [Nano-devel] the difficulties of behaving similar, Benno Schulenberg, 2014/06/19
- Re: [Nano-devel] the difficulties of behaving similar, Mark Majeres, 2014/06/19
- Re: [Nano-devel] the difficulties of behaving similar, Benno Schulenberg, 2014/06/21
- Re: [Nano-devel] the difficulties of behaving similar, Mark Majeres, 2014/06/21
- Re: [Nano-devel] the difficulties of behaving similar, Benno Schulenberg, 2014/06/21
- Re: [Nano-devel] the difficulties of behaving similar, Mark Majeres, 2014/06/21
- Re: [Nano-devel] the difficulties of behaving similar, Benno Schulenberg, 2014/06/22
- Re: [Nano-devel] the difficulties of behaving similar, Mark Majeres, 2014/06/22
- [Nano-devel] redoing cutting-to-end fails, Benno Schulenberg, 2014/06/22
- Re: [Nano-devel] redoing cutting-to-end fails, Mark Majeres, 2014/06/29