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 -- Br...@Moolenaar.net --
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 ///