mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 02:46:31 +00:00
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
@@ -591,15 +591,15 @@ String nvim_cmd(uint64_t channel_id, Dict(cmd) *cmd, Dict(cmd_opts) *opts, Error
|
||||
|
||||
if (*mods.split.data.string.data == NUL) {
|
||||
// Empty string, do nothing.
|
||||
} else if (STRCMP(mods.split.data.string.data, "aboveleft") == 0
|
||||
|| STRCMP(mods.split.data.string.data, "leftabove") == 0) {
|
||||
} else if (strcmp(mods.split.data.string.data, "aboveleft") == 0
|
||||
|| strcmp(mods.split.data.string.data, "leftabove") == 0) {
|
||||
cmdinfo.cmdmod.cmod_split |= WSP_ABOVE;
|
||||
} else if (STRCMP(mods.split.data.string.data, "belowright") == 0
|
||||
|| STRCMP(mods.split.data.string.data, "rightbelow") == 0) {
|
||||
} else if (strcmp(mods.split.data.string.data, "belowright") == 0
|
||||
|| strcmp(mods.split.data.string.data, "rightbelow") == 0) {
|
||||
cmdinfo.cmdmod.cmod_split |= WSP_BELOW;
|
||||
} else if (STRCMP(mods.split.data.string.data, "topleft") == 0) {
|
||||
} else if (strcmp(mods.split.data.string.data, "topleft") == 0) {
|
||||
cmdinfo.cmdmod.cmod_split |= WSP_TOP;
|
||||
} else if (STRCMP(mods.split.data.string.data, "botright") == 0) {
|
||||
} else if (strcmp(mods.split.data.string.data, "botright") == 0) {
|
||||
cmdinfo.cmdmod.cmod_split |= WSP_BOT;
|
||||
} else {
|
||||
VALIDATION_ERROR("Invalid value for 'mods.split'");
|
||||
@@ -938,7 +938,7 @@ void nvim_buf_del_user_command(Buffer buffer, String name, Error *err)
|
||||
|
||||
for (int i = 0; i < gap->ga_len; i++) {
|
||||
ucmd_T *cmd = USER_CMD_GA(gap, i);
|
||||
if (!STRCMP(name.data, cmd->uc_name)) {
|
||||
if (!strcmp(name.data, cmd->uc_name)) {
|
||||
free_ucmd(cmd);
|
||||
|
||||
gap->ga_len -= 1;
|
||||
|
@@ -845,7 +845,7 @@ static void remote_ui_raw_line(UI *ui, Integer grid, Integer row, Integer startc
|
||||
for (size_t i = 0; i < ncells; i++) {
|
||||
repeat++;
|
||||
if (i == ncells - 1 || attrs[i] != attrs[i + 1]
|
||||
|| STRCMP(chunk[i], chunk[i + 1])) {
|
||||
|| strcmp(chunk[i], chunk[i + 1])) {
|
||||
if (UI_BUF_SIZE - BUF_POS(data) < 2 * (1 + 2 + sizeof(schar_T) + 5 + 5)) {
|
||||
// close to overflowing the redraw buffer. finish this event,
|
||||
// flush, and start a new "grid_line" event at the current position.
|
||||
|
Reference in New Issue
Block a user