[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] [PATCH V5] Implement bookmarks
From: |
Brand Huntsman |
Subject: |
Re: [Nano-devel] [PATCH V5] Implement bookmarks |
Date: |
Mon, 3 Dec 2018 22:47:38 -0700 |
On Mon, 3 Dec 2018 23:59:39 -0200
Marco Diego Aurélio Mesquita <address@hidden> wrote:
> Attached patches implement bookmarks for gnu nano.
>
> Differences from V4:
> - Patch was broken in two as asked for in [1].
> - Escape sequences were added as asked for in [2].
> - Use SIZE_MAX as sentinel value to signal non-bookmarked line.
> This should fix the problem described in [3]
The first patch needs something like the attached patch to rebind the functions.
The "do_" prefix is being removed from all functions.
The bookmark_x field in filestruct, make_new_node() and copy_node() isn't
excluded from NANO_TINY.
Next and previous ignore (skip over) the bookmark on current line. An entire
paragraph could be a single line when softwrap is enabled. If cursor is on
first virtual line and the only bookmark is on last virtual line, jumping to
the bookmark will fail.
And what are your thoughts on only removing the bookmark if cursor is sitting
on it, instead of from anywhere on the same line? When not on bookmark it could
move it elsewhere on the line, and show a "Bookmark moved." message. In the
previous example, setting a bookmark on first virtual line will remove the
bookmark from the last virtual line and not set a new one. It will still be
confusing as to why the bookmark on last virtual line no longer exists but at
least if you jump to a bookmark elsewhere in file, you will be able to jump
back to the first virtual line of that paragraph.
bindable-functions-for-bookmarks.patch
Description: Text Data