@@ -225,12 +225,6 @@ function M._cleanup_diff_layout(tab_name, target_win, new_win)
225
225
logger .debug (" diff" , " [CLEANUP] Layout cleanup completed for:" , tab_name )
226
226
end
227
227
228
- --- Open diff using native Neovim functionality
229
- -- @param old_file_path string Path to the original file
230
- -- @param new_file_path string Path to the new file (used for naming)
231
- -- @param new_file_contents string Contents of the new file
232
- -- @param tab_name string Name for the diff tab/view
233
- -- @return table Result with provider, tab_name, and success status
234
228
-- Detect filetype from a path or existing buffer (best-effort)
235
229
local function _detect_filetype (path , buf )
236
230
-- 1) Try Neovim's builtin matcher if available (>=0.10)
@@ -276,6 +270,13 @@ local function _detect_filetype(path, buf)
276
270
return simple_map [ext ]
277
271
end
278
272
273
+ --- Open diff using native Neovim functionality
274
+ -- @param old_file_path string Path to the original file
275
+ -- @param new_file_path string Path to the new file (used for naming)
276
+ -- @param new_file_contents string Contents of the new file
277
+ -- @param tab_name string Name for the diff tab/view
278
+ -- @return table Result with provider, tab_name, and success status
279
+
279
280
function M ._open_native_diff (old_file_path , new_file_path , new_file_contents , tab_name )
280
281
local new_filename = vim .fn .fnamemodify (new_file_path , " :t" ) .. " .new"
281
282
local tmp_file , err = M ._create_temp_file (new_file_contents , new_filename )
0 commit comments