smallcloudai / refact-lsp

LSP server for Refact, suitable for Sublime Text, and other editors
BSD 3-Clause "New" or "Revised" License
22 stars 12 forks source link

error when attaching a file -- overflow #153

Closed valaises closed 3 months ago

valaises commented 4 months ago

main, 40b4bd7b95aebc474637f92669d9c588f56716f5

 2024-04-22T17:09:15.562125Z  WARN refact_lsp::scratchpads::chat_utils_rag:383: range in search results is outside of file lines that actually exist /Users/valaises/PycharmProjects/data-collection/github/scripts/s1_api_grabber/gh_utils.py:0-59
2024-04-22T17:09:15.564576Z ERROR refact_lsp:70: Panic occurred: PanicInfo { payload: Any { .. }, message: Some(attempt to subtract with overflow), location: Location { file: "src/scratchpads/chat_utils_rag.rs", line: 385, col: 46 }, can_unwind: true, force_no_backtrace: false }
            colorize_if_more_useful(linevec, omsg.line1-1, omsg.line2, &"nosymb".to_string(), 

because omsg.line1 is a size and is 0

valaises commented 4 months ago

https://github.com/smallcloudai/refact-lsp/pull/163