Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions libvscode-diff/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ if(USE_OPENMP)
target_link_libraries(vscode_diff PRIVATE ${OpenMP_omp_LIBRARY})
else()
# Standard OpenMP via find_package
target_compile_options(vscode_diff PRIVATE ${OpenMP_C_FLAGS})
target_link_libraries(vscode_diff PRIVATE OpenMP::OpenMP_C)

# Set RPATH to find bundled libgomp.so.1 in the same directory (Linux)
Expand Down Expand Up @@ -301,8 +300,8 @@ function(add_diff_test test_name)
# Enable OpenMP for tests too
if(USE_OPENMP)
target_compile_definitions(${test_name} PRIVATE USE_OPENMP)
target_compile_options(${test_name} PRIVATE ${OpenMP_C_FLAGS})
if(HOMEBREW_OPENMP)
target_compile_options(${test_name} PRIVATE ${OpenMP_C_FLAGS})
target_include_directories(${test_name} PRIVATE ${HOMEBREW_LIBOMP_INCLUDE})
target_link_libraries(${test_name} PRIVATE ${OpenMP_omp_LIBRARY})
else()
Expand Down Expand Up @@ -386,8 +385,8 @@ endif()
# Enable OpenMP for diff tool
if(USE_OPENMP)
target_compile_definitions(diff PRIVATE USE_OPENMP)
target_compile_options(diff PRIVATE ${OpenMP_C_FLAGS})
if(HOMEBREW_OPENMP)
target_compile_options(diff PRIVATE ${OpenMP_C_FLAGS})
target_include_directories(diff PRIVATE ${HOMEBREW_LIBOMP_INCLUDE})
target_link_libraries(diff PRIVATE ${OpenMP_omp_LIBRARY})
else()
Expand Down
24 changes: 4 additions & 20 deletions lua/codediff/ui/conflict/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -533,11 +533,7 @@ function M.accept_all_incoming(tabpage)
if count > 0 then
pcall(vim.cmd, "undojoin")
end
local incoming_lines = tracking.get_lines_for_range(
session.original_bufnr,
block.output1_range.start_line,
block.output1_range.end_line
)
local incoming_lines = tracking.get_lines_for_range(session.original_bufnr, block.output1_range.start_line, block.output1_range.end_line)
apply_to_result(result_bufnr, block, incoming_lines, base_lines)
count = count + 1
end
Expand Down Expand Up @@ -581,11 +577,7 @@ function M.accept_all_current(tabpage)
if count > 0 then
pcall(vim.cmd, "undojoin")
end
local current_lines = tracking.get_lines_for_range(
session.modified_bufnr,
block.output2_range.start_line,
block.output2_range.end_line
)
local current_lines = tracking.get_lines_for_range(session.modified_bufnr, block.output2_range.start_line, block.output2_range.end_line)
apply_to_result(result_bufnr, block, current_lines, base_lines)
count = count + 1
end
Expand Down Expand Up @@ -633,16 +625,8 @@ function M.accept_all_both(tabpage, first_input)
pcall(vim.cmd, "undojoin")
end

local incoming_lines = tracking.get_lines_for_range(
session.original_bufnr,
block.output1_range.start_line,
block.output1_range.end_line
)
local current_lines = tracking.get_lines_for_range(
session.modified_bufnr,
block.output2_range.start_line,
block.output2_range.end_line
)
local incoming_lines = tracking.get_lines_for_range(session.original_bufnr, block.output1_range.start_line, block.output1_range.end_line)
local current_lines = tracking.get_lines_for_range(session.modified_bufnr, block.output2_range.start_line, block.output2_range.end_line)

-- Combine both sides
local combined
Expand Down