mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 7.4.1288
Problem: ch_sendexpr() does not use JS encoding. Solution: Use the encoding that fits the channel mode. Refuse using ch_sendexpr() on a raw channel.
This commit is contained in:
@@ -1514,4 +1514,17 @@ set_ref_in_channel(int copyID)
|
||||
}
|
||||
return abort;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the mode of channel "idx".
|
||||
* If "idx" is invalid returns MODE_JSON.
|
||||
*/
|
||||
ch_mode_T
|
||||
channel_get_mode(int idx)
|
||||
{
|
||||
if (idx < 0 || idx >= channel_count)
|
||||
return MODE_JSON;
|
||||
return channels[idx].ch_mode;
|
||||
}
|
||||
|
||||
#endif /* FEAT_CHANNEL */
|
||||
|
Reference in New Issue
Block a user