Mercurial > vim
diff src/ops.c @ 29585:e357bc89bb95 v9.0.0133
patch 9.0.0133: virtual text after line moves to joined line
Commit: https://github.com/vim/vim/commit/e175dc6911948bcd0c854876b534fee62fb95b9f
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 1 22:18:50 2022 +0100
patch 9.0.0133: virtual text after line moves to joined line
Problem: Virtual text after line moves to joined line. (Yegappan
Lakshmanan)
Solution: When joining lines only keep virtual text after the last line.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 01 Aug 2022 23:30:03 +0200 |
parents | 8a243ecfe2dd |
children | dd96f3d8ed85 |
line wrap: on
line diff
--- a/src/ops.c +++ b/src/ops.c @@ -2012,7 +2012,8 @@ do_join( { curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t)); #ifdef FEAT_PROP_POPUP - propcount += count_props((linenr_T) (curwin->w_cursor.lnum + t), t > 0); + propcount += count_props((linenr_T) (curwin->w_cursor.lnum + t), + t > 0, t + 1 == count); #endif if (t == 0 && setmark && (cmdmod.cmod_flags & CMOD_LOCKMARKS) == 0) { @@ -2147,7 +2148,6 @@ do_join( curwin->w_cursor.lnum + t, t == count - 1, (long)(cend - newp), spaces_removed); #endif - if (t == 0) break; curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t - 1));