Mercurial > vim
comparison src/term.c @ 28616:6ff407067190 v8.2.4832
patch 8.2.4832: passing zero instead of NULL to a pointer argument
Commit: https://github.com/vim/vim/commit/fc78a0369e0d371a1a85d07045ff25d8695e8f8c
Author: zeertzjq <zeertzjq@outlook.com>
Date: Tue Apr 26 22:11:38 2022 +0100
patch 8.2.4832: passing zero instead of NULL to a pointer argument
Problem: Passing zero instead of NULL to a pointer argument.
Solution: Use NULL. (closes https://github.com/vim/vim/issues/10296)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 26 Apr 2022 23:15:02 +0200 |
parents | a54564337e89 |
children | daad4c7b39be |
comparison
equal
deleted
inserted
replaced
28615:3f75d7165fc5 | 28616:6ff407067190 |
---|---|
4503 ; | 4503 ; |
4504 } | 4504 } |
4505 #endif | 4505 #endif |
4506 | 4506 |
4507 /* | 4507 /* |
4508 * Put "string[new_slen]" in typebuf, or in "buf[bufsize]" if "buf" is not NULL. | 4508 * If "buf" is NULL put "string[new_slen]" in typebuf; "buflen" is not used. |
4509 * If "buf" is not NULL put "string[new_slen]" in "buf[bufsize]" and adjust | |
4510 * "buflen". | |
4509 * Remove "slen" bytes. | 4511 * Remove "slen" bytes. |
4510 * Returns FAIL for error. | 4512 * Returns FAIL for error. |
4511 */ | 4513 */ |
4512 int | 4514 int |
4513 put_string_in_typebuf( | 4515 put_string_in_typebuf( |
4689 // Ignore it for when the user has set 'term' to xterm, | 4691 // Ignore it for when the user has set 'term' to xterm, |
4690 // even though it's an rxvt. | 4692 // even though it's an rxvt. |
4691 if (version > 20000) | 4693 if (version > 20000) |
4692 version = 0; | 4694 version = 0; |
4693 | 4695 |
4694 // Figure out more if the reeponse is CSI > 99 ; 99 ; 99 c | 4696 // Figure out more if the response is CSI > 99 ; 99 ; 99 c |
4695 if (first == '>' && argc == 3) | 4697 if (first == '>' && argc == 3) |
4696 { | 4698 { |
4697 int need_flush = FALSE; | 4699 int need_flush = FALSE; |
4698 | 4700 |
4699 // mintty 2.9.5 sends 77;20905;0c. | 4701 // mintty 2.9.5 sends 77;20905;0c. |
4834 OPT_FREE, 0); | 4836 OPT_FREE, 0); |
4835 } | 4837 } |
4836 if (*T_8U != NUL && write_t_8u_state == MAYBE) | 4838 if (*T_8U != NUL && write_t_8u_state == MAYBE) |
4837 // Did skip writing t_8u, a complete redraw is needed. | 4839 // Did skip writing t_8u, a complete redraw is needed. |
4838 redraw_later_clear(); | 4840 redraw_later_clear(); |
4839 write_t_8u_state = OK; // can otuput t_8u now | 4841 write_t_8u_state = OK; // can output t_8u now |
4840 | 4842 |
4841 // Only set 'ttymouse' automatically if it was not set | 4843 // Only set 'ttymouse' automatically if it was not set |
4842 // by the user already. | 4844 // by the user already. |
4843 if (!option_was_set((char_u *)"ttym") | 4845 if (!option_was_set((char_u *)"ttym") |
4844 && (term_props[TPR_MOUSE].tpr_status == TPR_MOUSE_XTERM2 | 4846 && (term_props[TPR_MOUSE].tpr_status == TPR_MOUSE_XTERM2 |