[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] [PATCH V9] Implement bookmarks
From: |
Benno Schulenberg |
Subject: |
Re: [Nano-devel] [PATCH V9] Implement bookmarks |
Date: |
Mon, 10 Dec 2018 12:06:42 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 |
Op 06-12-18 om 23:27 schreef Marco Diego Aurélio Mesquita:
> Added infrastructure to toogle and jump to bookmarks. A buffer
Toogle?
> /* Most functions in text.c. */
> #ifndef NANO_TINY
> void do_mark(void);
> +void bookmark(void);
> +void to_previous_bookmark(void);
> +void to_next_bookmark(void);
The bookmark functions are movement/search functions. They are
related to gotolinecolumn, not to toggling the mark. So... put
them at the end of search.c.
> +static void go_to_bookmark(bool next)
> +{
> + filestruct *current = openfile->current;
> + const filestruct *first = current;
> +
> + do {
> + current = next ? current->next : current->prev;
Better call the bool 'forward', otherwise there is too much "next".
And better call 'current' simply 'line' instead, because openfile->
current will only be adjusted when a bookmark is found.
> - add_to_funcs(to_prev_bookmark, MMAIN,
> + add_to_funcs(to_previous_bookmark, MMAIN,
> N_("Previous mark"), WITHORSANS(prevbookmark_gist), TOGETHER,
> NOVIEW);
Eh? This should have been named correctly in the first patch.
> address@hidden bookmark
> +Set or remove a bookmark on the current line.
Descriptions of bindable functions should be in the third person:
"Sets or removes...". (An existing mistake has been corrected.)
> address@hidden prevbookmark
> +Go to previous bookmark on the current buffer.
> +
> address@hidden nextbookmark
> +Go to next bookmark on the current buffer.
s/Go to/Goes to the/
s/on/in/
Benno
signature.asc
Description: OpenPGP digital signature