[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] [RFC] add a toggle to write out a selection instead of
From: |
Benno Schulenberg |
Subject: |
Re: [Nano-devel] [RFC] add a toggle to write out a selection instead of the entire buffer |
Date: |
Sun, 25 Feb 2018 11:37:05 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
Op 25-02-18 om 06:34 schreef Brand Huntsman:
> Updated patch moves cursor to end of filename (repeated toggling) and
> shortens the help bar text.
Okay, I'll accept. But please split the patch into two: one that
doesn't change any prompt text, and a second that additionally
differentiates the prompts according to the situation.
> + if (write_selection) {
> + reinit_statusbar_x();
> + given = mallocstrcpy(given, openfile->filename);
> + write_selection = FALSE;
> + } else if (openfile->mark && !exiting &&
> !ISSET(RESTRICTED)) {
> + reinit_statusbar_x();
> + given = mallocstrcpy(given, "");
> + write_selection = TRUE;
The second reinit is not needed: x will automatically be limited to
the length of given.
Benno
signature.asc
Description: OpenPGP digital signature