mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	only check got_int with ex_echo
Ref: https://github.com/neovim/neovim/pull/10926#discussion_r320706446
This commit is contained in:
		| @@ -20903,7 +20903,7 @@ void ex_echo(exarg_T *eap) | ||||
|       char *tofree = encode_tv2echo(&rettv, NULL); | ||||
|       if (*tofree != NUL) { | ||||
|         msg_ext_set_kind("echo"); | ||||
|         msg_multiline_attr(tofree, echo_attr); | ||||
|         msg_multiline_attr(tofree, echo_attr, true); | ||||
|       } | ||||
|       xfree(tofree); | ||||
|     } | ||||
|   | ||||
| @@ -222,12 +222,12 @@ int msg_attr(const char *s, const int attr) | ||||
| } | ||||
|  | ||||
| /// similar to msg_outtrans_attr, but support newlines and tabs. | ||||
| void msg_multiline_attr(const char *s, int attr) | ||||
| void msg_multiline_attr(const char *s, int attr, bool check_int) | ||||
|   FUNC_ATTR_NONNULL_ALL | ||||
| { | ||||
|   const char *next_spec = s; | ||||
|  | ||||
|   while (next_spec != NULL && !got_int) { | ||||
|   while (next_spec != NULL && (!check_int || !got_int)) { | ||||
|     next_spec = strpbrk(s, "\t\n\r"); | ||||
|  | ||||
|     if (next_spec != NULL) { | ||||
| @@ -306,7 +306,7 @@ bool msg_attr_keep(char_u *s, int attr, bool keep, bool multiline) | ||||
|     s = buf; | ||||
|  | ||||
|   if (multiline) { | ||||
|     msg_multiline_attr((char *)s, attr); | ||||
|     msg_multiline_attr((char *)s, attr, false); | ||||
|   } else { | ||||
|     msg_outtrans_attr(s, attr); | ||||
|   } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Daniel Hahler
					Daniel Hahler