[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] pasting into a line deletes its bookmark
From: |
Benno Schulenberg |
Subject: |
Re: [Nano-devel] pasting into a line deletes its bookmark |
Date: |
Tue, 18 Dec 2018 13:52:03 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 |
Op 18-12-18 om 02:49 schreef Marco Diego Aurélio Mesquita:
> It looks like managing bookmarked lines has many corner cases which
> I overlooked.
>
> To improved the situation, I decided to enumerate some test-cases,
> found and fixed some bugs.
I don't think your patch with fixes takes the right approach.
Instead of looking at and fixing all the different operations,
I think it should be done simpler: before doing an operation,
remember whether the current line is bookmarked; and after the
operation make sure the current line gets the same state --
except when pasting or inserting something that includes a
newline. Probably this should be done at the highest level,
or somewhere in do_input().
Doing things that way would mean that deleting the current line
leaves the bookmark in place: on the line that is now the current
line. I even think that is better behavior: when I plant a flag
somewhere, I want the flag to keep standing also when I cut away
some earth around it. This also means that a bookmark should not
"travel" into the cutbuffer and does not get "replanted" where
the cutbuffer gets pasted (and would get replanted multiple times
if you pasted the cutbuffer multiple times).
See if that method makes for a simpler fixes patch, because if
you have to add tens of extra lines to make the bookmarking stuff
work, I'm not going to accept the whole patch set.
Benno
signature.asc
Description: OpenPGP digital signature
- [Nano-devel] [PATCH 1/3 V13] new feature: bindable functions for toggling and jumping to bookmarks, Benno Schulenberg, 2018/12/17
- [Nano-devel] [PATCH 2/3 V13] bindings: hard-bind the bookmark functions to M-Ins and M-PgUp/M-PgDn, Benno Schulenberg, 2018/12/17
- [Nano-devel] [PATCH 3/3 V13] docs: add descriptions of the bindable bookmark functions, Benno Schulenberg, 2018/12/17
- Re: [Nano-devel] [PATCH 1/3 V13] new feature: bindable functions for toggling and jumping to bookmarks, Benno Schulenberg, 2018/12/17
- [Nano-devel] pasting into a line deletes its bookmark, Benno Schulenberg, 2018/12/17
- Re: [Nano-devel] pasting into a line deletes its bookmark, Marco Diego Aurélio Mesquita, 2018/12/17
- Re: [Nano-devel] pasting into a line deletes its bookmark, Benno Schulenberg, 2018/12/17
- Re: [Nano-devel] pasting into a line deletes its bookmark, Marco Diego Aurélio Mesquita, 2018/12/17
- Re: [Nano-devel] pasting into a line deletes its bookmark, Marco Diego Aurélio Mesquita, 2018/12/17
- Re: [Nano-devel] pasting into a line deletes its bookmark,
Benno Schulenberg <=
- Re: [Nano-devel] pasting into a line deletes its bookmark, Marco Diego Aurélio Mesquita, 2018/12/18
- Re: [Nano-devel] pasting into a line deletes its bookmark, Benno Schulenberg, 2018/12/19