Christian wrote:
> while looking into #4427 I noticed that there is some dead code, that
> cannot be reached. So here is a patch:
>
> diff --git a/src/textprop.c b/src/textprop.c
> index cc95546e2..7029daaae 100644
> --- a/src/textprop.c
> +++ b/src/textprop.c
> @@ -1067,13 +1067,7 @@ adjust_prop_columns(
> if (bytes_added > 0
> && (tmp_prop.tp_col >= col + (start_incl ? 2 : 1)))
> {
> - if (tmp_prop.tp_col < col + (start_incl ? 2 : 1))
> - {
> - tmp_prop.tp_len += (tmp_prop.tp_col - 1 - col) + bytes_added;
> - tmp_prop.tp_col = col + 1;
> - }
> - else
> - tmp_prop.tp_col += bytes_added;
> + tmp_prop.tp_col += bytes_added;
> // Save for undo if requested and not done yet.
> if ((flags & APC_SAVE_FOR_UNDO) && !dirty)
> u_savesub(lnum);
I'll include it, thanks. Although I wonder if another situation needs
to be handled.
> BTW: I think the problem for #4427 is, that one uses the old byte column
> numbers for adjust_prop_columns(), while one should use the column
> numbers for the newly added text.
I had completely missed that issue. Added to the todo list now.
But perhaps you are already making a fix?
--
For large projects, Team Leaders use sophisticated project management software
to keep track of who's doing what. The software collects the lies and guesses
of the project team and organizes them in to instantly outdated charts that
are too boring to look at closely. This is called "planning".
(Scott Adams - The Dilbert principle)
/// 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/201910251952.x9PJqUos027521%40masaka.moolenaar.net.