mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 13:38:34 +00:00
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
@@ -2043,7 +2043,7 @@ int do_source(char *fname, int check_other, int is_vimrc)
|
||||
} else {
|
||||
// Read the first line so we can check for a UTF-8 BOM.
|
||||
firstline = (uint8_t *)getsourceline(0, (void *)&cookie, 0, true);
|
||||
if (firstline != NULL && STRLEN(firstline) >= 3 && firstline[0] == 0xef
|
||||
if (firstline != NULL && strlen((char *)firstline) >= 3 && firstline[0] == 0xef
|
||||
&& firstline[1] == 0xbb && firstline[2] == 0xbf) {
|
||||
// Found BOM; setup conversion, skip over BOM and recode the line.
|
||||
convert_setup(&cookie.conv, "utf-8", p_enc);
|
||||
|
Reference in New Issue
Block a user