Skip to content

Commit aa50a24

Browse files
committed
cleanup?
1 parent b961b72 commit aa50a24

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

lua/claudecode/selection.lua

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -447,12 +447,6 @@ function M.get_visual_selection()
447447
local current_buf = vim.api.nvim_get_current_buf()
448448
local raw_file_path = vim.api.nvim_buf_get_name(current_buf)
449449

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-
456450
local lines_content = vim.api.nvim_buf_get_lines(
457451
current_buf,
458452
start_coords.lnum - 1, -- Convert to 0-indexed
@@ -497,12 +491,6 @@ function M.get_cursor_position()
497491
local cursor_pos = vim.api.nvim_win_get_cursor(0)
498492
local current_buf = vim.api.nvim_get_current_buf()
499493
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
506494

507495
return {
508496
text = "",
@@ -597,12 +585,6 @@ function M.get_range_selection(line1, line2)
597585

598586
local current_buf = vim.api.nvim_get_current_buf()
599587
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
606588

607589
-- Get the total number of lines in the buffer
608590
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)
688670
-- Sanity check: ensure the selection is for the current buffer
689671
local raw_current_buf_name = vim.api.nvim_buf_get_name(vim.api.nvim_get_current_buf())
690672

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-
697673
if sel_to_send.filePath ~= current_buf_name then
698674
logger.warn(
699675
"selection",

0 commit comments

Comments
 (0)