From 79e04a54c71d3dd1c6366f189b8d1e0d35101bb8 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Mon, 8 Apr 2019 12:21:04 -0700 Subject: [PATCH] misc fixes --- 4ed_api_implementation.cpp | 3 +++ platform_win32/win32_4ed_functions.cpp | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) 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++] = '\\';