diff --git a/4ed_api_implementation.cpp b/4ed_api_implementation.cpp index 813ee3c4..20c4d3c8 100644 --- a/4ed_api_implementation.cpp +++ b/4ed_api_implementation.cpp @@ -1869,6 +1869,9 @@ DOC_SEE(Buffer_Seek) Editing_File *file = view->file; Assert(file != 0); if (api_check_buffer(file)){ + if (file->settings.unwrapped_lines && seek.type == buffer_seek_wrapped_xy){ + seek.type = buffer_seek_unwrapped_xy; + } Full_Cursor cursor = file_compute_cursor(models->system, file, seek); view_set_cursor(models->system, models, view, cursor, set_preferred_x); result = true; diff --git a/platform_win32/win32_4ed_functions.cpp b/platform_win32/win32_4ed_functions.cpp index 7d96c138..a77d3cae 100644 --- a/platform_win32/win32_4ed_functions.cpp +++ b/platform_win32/win32_4ed_functions.cpp @@ -127,8 +127,8 @@ Sys_Log_Sig(system_log){ internal String win32_remove_unc_prefix_characters(String path){ if (match_part(path, make_lit_string("\\\\?\\UNC"))){ - path.size -= 6; - memmove(path.str, path.str + 6, path.size); + path.size -= 7; + memmove(path.str, path.str + 7, path.size); path.str[0] = '\\'; } else if (match_part(path, make_lit_string("\\\\?\\"))){ @@ -168,7 +168,7 @@ Sys_Set_File_List_Sig(system_set_file_list){ c_str_dir[final_length + 2] = 0; if (canon_directory_out != 0){ - if (final_length+1 < canon_directory_max){ + if (final_length + 1 < canon_directory_max){ memcpy(canon_directory_out, c_str_dir, final_length); if (canon_directory_out[final_length-1] != '\\'){ canon_directory_out[final_length++] = '\\';