0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.0.0453: adding fold marker creates new comment

Problem:    Adding fold marker creates new comment.
Solution:   Use an existing comment if possible. (LemonBoy, closes #1549)
This commit is contained in:
Bram Moolenaar
2017-03-12 20:37:21 +01:00
parent 1c46544412
commit 025a6b708a
5 changed files with 27 additions and 5 deletions

View File

@@ -113,9 +113,6 @@ static void copy_yank_reg(yankreg_T *reg);
static void may_set_selection(void);
#endif
static void dis_msg(char_u *p, int skip_esc);
#if defined(FEAT_COMMENTS) || defined(PROTO)
static char_u *skip_comment(char_u *line, int process, int include_space, int *is_comment);
#endif
static void block_prep(oparg_T *oap, struct block_def *, linenr_T, int);
static int do_addsub(int op_type, pos_T *pos, int length, linenr_T Prenum1);
#if defined(FEAT_CLIPBOARD) || defined(FEAT_EVAL)
@@ -4301,7 +4298,7 @@ dis_msg(
* is_comment - will indicate whether the current line ends with an unclosed
* comment.
*/
static char_u *
char_u *
skip_comment(
char_u *line,
int process,