@@ -447,12 +447,6 @@ function M.get_visual_selection()
447
447
local current_buf = vim .api .nvim_get_current_buf ()
448
448
local raw_file_path = vim .api .nvim_buf_get_name (current_buf )
449
449
450
- -- Extract real filesystem path from mini.files buffer path if needed
451
- local file_path = raw_file_path
452
- if file_path :match (" ^minifiles://" ) then
453
- file_path = file_path :gsub (" ^minifiles://[^/]*/" , " " )
454
- end
455
-
456
450
local lines_content = vim .api .nvim_buf_get_lines (
457
451
current_buf ,
458
452
start_coords .lnum - 1 , -- Convert to 0-indexed
@@ -497,12 +491,6 @@ function M.get_cursor_position()
497
491
local cursor_pos = vim .api .nvim_win_get_cursor (0 )
498
492
local current_buf = vim .api .nvim_get_current_buf ()
499
493
local raw_file_path = vim .api .nvim_buf_get_name (current_buf )
500
-
501
- -- Extract real filesystem path from mini.files buffer path if needed
502
- local file_path = raw_file_path
503
- if file_path :match (" ^minifiles://" ) then
504
- file_path = file_path :gsub (" ^minifiles://[^/]*/" , " " )
505
- end
506
494
507
495
return {
508
496
text = " " ,
@@ -597,12 +585,6 @@ function M.get_range_selection(line1, line2)
597
585
598
586
local current_buf = vim .api .nvim_get_current_buf ()
599
587
local raw_file_path = vim .api .nvim_buf_get_name (current_buf )
600
-
601
- -- Extract real filesystem path from mini.files buffer path if needed
602
- local file_path = raw_file_path
603
- if file_path :match (" ^minifiles://" ) then
604
- file_path = file_path :gsub (" ^minifiles://[^/]*/" , " " )
605
- end
606
588
607
589
-- Get the total number of lines in the buffer
608
590
local total_lines = vim .api .nvim_buf_line_count (current_buf )
@@ -688,12 +670,6 @@ function M.send_at_mention_for_visual_selection(line1, line2)
688
670
-- Sanity check: ensure the selection is for the current buffer
689
671
local raw_current_buf_name = vim .api .nvim_buf_get_name (vim .api .nvim_get_current_buf ())
690
672
691
- -- Extract real filesystem path from mini.files buffer path if needed
692
- local current_buf_name = raw_current_buf_name
693
- if current_buf_name :match (" ^minifiles://" ) then
694
- current_buf_name = current_buf_name :gsub (" ^minifiles://[^/]*/" , " " )
695
- end
696
-
697
673
if sel_to_send .filePath ~= current_buf_name then
698
674
logger .warn (
699
675
" selection" ,
0 commit comments