Axel Forsman wrote:

> While trying out the new cool text properties feature, one thing puzzled me:
> Any attempts at, in insert mode or whatever, splitting a continuous
> text property over multiple lines
> actually created new ones, instead of extending the one that was already 
> there.
> 
> For example, if '#' represents a textprop, with
> 
>     Lorem ###|### ipsum
> 
> with the cursor being *inside* the textprop,
> typing '<CR><CR><Up>...' produces:
> 
>     Lorem ###
>     ...|
>     ### ipsum
> 
> where the `...` in not in the textprop.
> This is contrary to what I would expect -
> that editing inside a textprop should never break into into two.

Right, this part was never fully implemented.  You are the first to
remark about it.  It should be possible to make this work, it requires
someone taking the time to dive into it.

> I also found it really non-obvious how one would go about
> programmatically performing an edit to the buffer text and
> have the textprops react in the intuitive way like if the edit was
> done manually.
> 
> Is there any chance this could get fixed, or at least add a note in
> the doc for why it works this way?
> I do not really see when the existing behavior would be desirable,
> and it does complicate my efforts to create a snippet plugin.

-- 
>From "know your smileys":
 :-| :-|   Deja' vu!

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202002221401.01ME1x4u009777%40masaka.moolenaar.net.

Raspunde prin e-mail lui