Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for l = cur, 1, -1 do | ||
| local line = vim.fn.getline(l) | ||
| if line:match("^%s*# %%%%") and l ~= cur then | ||
| start = l + 1 |
There was a problem hiding this comment.
Treat current cell marker as a boundary
When the cursor is on a # %% marker line, the l ~= cur guard prevents the current marker from being recognized as the start of the cell. In that situation, start is taken from the previous marker and finish from the next marker, so the range includes the marker line and can send the previous cell instead of the intended cell below the marker. This only happens when the user triggers the mapping while their cursor is on the marker line, but it will send the wrong cell contents in that common workflow.
Useful? React with 👍 / 👎.
No description provided.