Merge pull request #21702 from glepnir/fix_2

fix(api): convert title_pos string in nvim_win_get_config
This commit is contained in:
bfredl
2023-01-09 12:33:08 +01:00
committed by GitHub
2 changed files with 31 additions and 1 deletions

View File

@@ -299,7 +299,15 @@ Dictionary nvim_win_get_config(Window window, Error *err)
ADD(titles, ARRAY_OBJ(tuple));
}
PUT(rv, "title", ARRAY_OBJ(titles));
PUT(rv, "title_pos", INTEGER_OBJ(config->title_pos));
char *title_pos;
if (config->title_pos == kAlignLeft) {
title_pos = "left";
} else if (config->title_pos == kAlignCenter) {
title_pos = "center";
} else {
title_pos = "right";
}
PUT(rv, "title_pos", CSTR_TO_OBJ(title_pos));
}
}
}