prompt improvement: get 100 buffer lines above and below instead of whole file - #159
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
|
You have used all of your free Bugbot PR reviews. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
|
wouldnt this compute iam not a pro but I think its worht checking if nvim treats negative see #171 fro my try to rework this a bit |

Note
Low Risk
Low risk: only changes prompt context generation for visual selections by limiting included buffer text, with minimal impact beyond prompt contents and potential off-by-one range edge cases.
Overview
Updates the
visual_selectionprompt to embed only nearby buffer context (100 lines above/below the selection) instead of dumping the entire file.Adds
get_surrounding_context(range, n)to compute the bounded slice of buffer lines used in the prompt, reducing prompt size and improving relevance.Written by Cursor Bugbot for commit e939b97. This will update automatically on new commits. Configure here.