mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 7.4.1470
Problem: Coverity reports missing restore. Solution: Move json_encode() call up.
This commit is contained in:
@@ -1550,6 +1550,11 @@ may_invoke_callback(channel_T *channel, int part)
|
|||||||
else if (callback != NULL || buffer != NULL)
|
else if (callback != NULL || buffer != NULL)
|
||||||
{
|
{
|
||||||
if (buffer != NULL)
|
if (buffer != NULL)
|
||||||
|
{
|
||||||
|
if (msg == NULL)
|
||||||
|
/* JSON or JS mode: re-encode the message. */
|
||||||
|
msg = json_encode(listtv, ch_mode);
|
||||||
|
if (msg != NULL)
|
||||||
{
|
{
|
||||||
buf_T *save_curbuf = curbuf;
|
buf_T *save_curbuf = curbuf;
|
||||||
linenr_T lnum = buffer->b_ml.ml_line_count;
|
linenr_T lnum = buffer->b_ml.ml_line_count;
|
||||||
@@ -1562,11 +1567,6 @@ may_invoke_callback(channel_T *channel, int part)
|
|||||||
/* ignore undo failure, undo is not very useful here */
|
/* ignore undo failure, undo is not very useful here */
|
||||||
ignored = u_save(lnum, lnum + 1);
|
ignored = u_save(lnum, lnum + 1);
|
||||||
|
|
||||||
if (msg == NULL)
|
|
||||||
/* JSON or JS mode: re-encode the message. */
|
|
||||||
msg = json_encode(listtv, ch_mode);
|
|
||||||
if (msg != NULL)
|
|
||||||
{
|
|
||||||
ml_append(lnum, msg, 0, FALSE);
|
ml_append(lnum, msg, 0, FALSE);
|
||||||
appended_lines_mark(lnum, 1L);
|
appended_lines_mark(lnum, 1L);
|
||||||
curbuf = save_curbuf;
|
curbuf = save_curbuf;
|
||||||
|
@@ -743,6 +743,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1470,
|
||||||
/**/
|
/**/
|
||||||
1469,
|
1469,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user